[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] test_parseconf.sh: On --dump-config failure, --verify-config



commit 11cf4d9c3a62c4c501f91e883d1645cc57fbbee9
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Sep 13 18:31:59 2019 -0400

    test_parseconf.sh: On --dump-config failure, --verify-config
---
 src/test/test_parseconf.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/test/test_parseconf.sh b/src/test/test_parseconf.sh
index afac358cb..2175db48a 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 \



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits