summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/bt_test.py8
-rw-r--r--src/test/include.am9
-rwxr-xr-xsrc/test/test_bt.sh6
-rw-r--r--src/test/test_options.c4
4 files changed, 19 insertions, 8 deletions
diff --git a/src/test/bt_test.py b/src/test/bt_test.py
index dab02d7699..30591453b9 100755
--- a/src/test/bt_test.py
+++ b/src/test/bt_test.py
@@ -39,7 +39,15 @@ for I in range(len(LINES)):
print("OK")
sys.exit(0)
+print("BAD")
+
for l in LINES:
print("{}".format(l), end="")
+if sys.platform.startswith('freebsd'):
+ # See bug #17808 if you know how to fix this.
+ print("Test failed; but FreeBSD is known to have backtrace problems.\n"
+ "Treating as 'SKIP'.")
+ sys.exit(77)
+
sys.exit(1)
diff --git a/src/test/include.am b/src/test/include.am
index 786fb77dd0..7d80fdf152 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -151,9 +151,12 @@ src_test_test_switch_id_LDADD = \
src_test_test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
@TOR_LDFLAGS_libevent@
-src_test_test_LDADD = src/or/libtor-testing.a src/common/libor-testing.a \
- src/common/libor-crypto-testing.a $(LIBKECCAK_TINY) $(LIBDONNA) \
- src/common/libor.a src/common/libor-event-testing.a \
+src_test_test_LDADD = src/or/libtor-testing.a \
+ src/common/libor-crypto-testing.a \
+ $(LIBKECCAK_TINY) \
+ $(LIBDONNA) \
+ src/common/libor-testing.a \
+ src/common/libor-event-testing.a \
src/trunnel/libor-trunnel-testing.a \
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \
@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ \
diff --git a/src/test/test_bt.sh b/src/test/test_bt.sh
index f55f451f92..033acac955 100755
--- a/src/test/test_bt.sh
+++ b/src/test/test_bt.sh
@@ -3,8 +3,8 @@
exitcode=0
-"${builddir:-.}/src/test/test-bt-cl" backtraces || exit 77
-"${builddir:-.}/src/test/test-bt-cl" assert | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode=1
-"${builddir:-.}/src/test/test-bt-cl" crash | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode=1
+"${builddir:-.}/src/test/test-bt-cl" backtraces || exit $?
+"${builddir:-.}/src/test/test-bt-cl" assert | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode="$?"
+"${builddir:-.}/src/test/test-bt-cl" crash | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode="$?"
exit ${exitcode}
diff --git a/src/test/test_options.c b/src/test/test_options.c
index ff1eb1855e..d294e607a2 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -1058,7 +1058,7 @@ test_options_validate__transproxy(void *ignored)
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);
tt_int_op(ret, OP_EQ, -1);
-#if !defined(__FreeBSD__) && !defined( DARWIN )
+#ifndef KERNEL_MAY_SUPPORT_IPFW
tt_str_op(msg, OP_EQ, "ipfw is a FreeBSD-specificand OS X/Darwin-specific "
"feature.");
#else
@@ -1086,7 +1086,7 @@ test_options_validate__transproxy(void *ignored)
tt_int_op(ret, OP_EQ, -1);
tt_assert(!msg);
#endif
-#if defined(__FreeBSD__) || defined( DARWIN )
+#if defined(__FreeBSD_kernel__) || defined( DARWIN )
tdata = get_options_test_data("TransProxyType ipfw\n"
"TransPort 127.0.0.1:123\n");
ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg);