summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-09-13 18:31:59 -0400
committerNick Mathewson <nickm@torproject.org>2019-09-14 19:00:41 -0400
commit11cf4d9c3a62c4c501f91e883d1645cc57fbbee9 (patch)
tree5ab97ef32de0d357f44f19a81f12bffee7ddff00
parent7e9ee3a58d609b284b163a22782488350a2f0d0b (diff)
downloadtor-11cf4d9c3a62c4c501f91e883d1645cc57fbbee9.tar.gz
tor-11cf4d9c3a62c4c501f91e883d1645cc57fbbee9.zip
test_parseconf.sh: On --dump-config failure, --verify-config
-rwxr-xr-xsrc/test/test_parseconf.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/test_parseconf.sh b/src/test/test_parseconf.sh
index afac358cbd..2175db48ac 100755
--- a/src/test/test_parseconf.sh
+++ b/src/test/test_parseconf.sh
@@ -145,11 +145,18 @@ for dir in "${EXAMPLEDIR}"/*; do
echo "OK"
else
echo "FAIL"
+ if test "$(wc -c < "${DATA_DIR}/output.${testname}")" = 0; then
+ # There was no output -- probably we failed.
+ "${TOR_BINARY}" -f "./torrc" \
+ --defaults-torrc "${DEFAULTS}" \
+ --verify-config \
+ ${CMDLINE} || true
+ fi
diff -u "./expected" "${DATA_DIR}/output.${testname}"
exit 1
fi
- elif test -f "./error"; then
+ elif test -f "./error"; then
# This case should fail: run verify-config and see if it does.
"${TOR_BINARY}" --verify-config \