]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
test/parseconf: Warn when the expected_log* file is missing
authorteor <teor@torproject.org>
Thu, 14 Nov 2019 02:57:59 +0000 (12:57 +1000)
committerteor <teor@torproject.org>
Thu, 14 Nov 2019 02:57:59 +0000 (12:57 +1000)
Part of 32451.

src/test/test_parseconf.sh

index 2298f0234f384f263b3ae3302fd139975de6a9b5..4fe27d9f5d26a52289a5fc7b7f664129b2381848 100755 (executable)
@@ -614,12 +614,18 @@ for dir in "${EXAMPLEDIR}"/*; do
             # This case should succeed: run verify-config and see if it does.
 
             check_verify_config "./torrc" \
-                          "$DEFAULTS" \
-                          "$CMDLINE" \
-                          "${DATA_DIR}/output_log.${testname}" \
-                          "$TRUE" \
-                          "$EXPECTED_LOG" \
-                          "log success"
+                                "$DEFAULTS" \
+                                "$CMDLINE" \
+                                "${DATA_DIR}/output_log.${testname}" \
+                                "$TRUE" \
+                                "$EXPECTED_LOG" \
+                                "log success"
+        else
+            printf "\\nNOTICE: Missing '%s_log' file:\\n" \
+                   "$EXPECTED" >&2
+            log_verify_config "./torrc" \
+                              "$DEFAULTS" \
+                              "$CMDLINE"
         fi
 
    elif test -f "$ERROR"; then