1 # Copyright 2013-2015, The Tor Project, Inc
2 # See LICENSE for licensing information
7 This file tests the output from test-bt-cl to make sure it's as expected.
11 $ ./src/test/test-bt-cl crash | ./src/test/bt_test.py
13 $ ./src/test/test-bt-cl assert | ./src/test/bt_test.py
18 from __future__
import print_function
22 def matches(lines
, funcs
):
23 if len(lines
) < len(funcs
):
26 for l
, f
in zip(lines
, funcs
):
33 FUNCNAMES
= "crash oh_what a_tangled_web we_weave main".split()
35 LINES
= sys
.stdin
.readlines()
37 for I
in range(len(LINES
)):
38 if matches(LINES
[I
:], FUNCNAMES
):
45 print("{}".format(l
), end
="")
47 if sys
.platform
.startswith('freebsd'):
48 # See bug #17808 if you know how to fix this.
49 print("Test failed; but FreeBSD is known to have backtrace problems.\n"
50 "Treating as 'SKIP'.")