diff options
author | teor <teor@torproject.org> | 2019-11-12 15:21:10 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-11-14 10:55:21 +1000 |
commit | 7ef44100c4d85fbd091c3965013b5465872a05f6 (patch) | |
tree | b3ae21fe9f566817aaccb1a6e1612b4b94bf5d5d /src/test/test_parseconf.sh | |
parent | 3df64320067625e1ce888b9bd11943524ee8f47d (diff) | |
download | tor-7ef44100c4d85fbd091c3965013b5465872a05f6.tar.gz tor-7ef44100c4d85fbd091c3965013b5465872a05f6.zip |
test/parseconf: Standardise output messages
Part of 32451.
Diffstat (limited to 'src/test/test_parseconf.sh')
-rwxr-xr-x | src/test/test_parseconf.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/test/test_parseconf.sh b/src/test/test_parseconf.sh index f298072c3e..962d43dd77 100755 --- a/src/test/test_parseconf.sh +++ b/src/test/test_parseconf.sh @@ -311,20 +311,23 @@ for dir in "${EXAMPLEDIR}"/*; do if ! cmp "${DATA_DIR}/output.${testname}" \ "${DATA_DIR}/output_2.${testname}"; then - echo "FAIL: $EXPECTED did not match on round-trip." >&2 + echo "FAIL: $EXPECTED did not match on round-trip:" >&2 + diff -u "${DATA_DIR}/output.${testname}" \ + "${DATA_DIR}/output_2.${testname}" >&2 \ + || true FINAL_EXIT=$EXITCODE fi else FAILED_CONFIG="yes" - echo "FAIL" >&2 if test "$(wc -c < "${DATA_DIR}/output.${testname}")" = 0; then + echo "FAIL: $EXPECTED: Tor said:" >&2 # There was no output -- probably we failed. "${TOR_BINARY}" -f "./torrc" \ --defaults-torrc "${DEFAULTS}" \ --verify-config \ ${CMDLINE} || true fi - echo "FAIL: $EXPECTED did not match." >&2 + echo "FAIL: $EXPECTED did not match:" >&2 diff -u "$EXPECTED" "${DATA_DIR}/output.${testname}" >&2 \ || true FINAL_EXIT=$EXITCODE @@ -346,8 +349,8 @@ for dir in "${EXAMPLEDIR}"/*; do : else FAILED_LOG="yes" - echo "FAIL" >&2 - echo "Expected $EXPECTED_LOG: ${expect_log}" >&2 + echo "FAIL: Expected $EXPECTED_LOG:" >&2 + echo "${expect_log}" >&2 echo "Tor said:" >&2 cat "${DATA_DIR}/output_log.${testname}" >&2 FINAL_EXIT=$EXITCODE @@ -378,8 +381,8 @@ for dir in "${EXAMPLEDIR}"/*; do if grep "${expect_err}" "${DATA_DIR}/output.${testname}" >/dev/null; then echo "OK" else - echo "FAIL" >&2 - echo "Expected $ERROR: ${expect_err}" >&2 + echo "FAIL: Expected $ERROR: " >&2 + echo "${expect_err}" >&2 echo "Tor said:" >&2 cat "${DATA_DIR}/output.${testname}" >&2 FINAL_EXIT=$EXITCODE |