mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
test/parseconf: Consistenly use FAIL
Obviously correct fixes on already reviewed code.
This commit is contained in:
parent
03618e0d68
commit
1dd6717db5
@ -187,7 +187,7 @@ for dir in "${EXAMPLEDIR}"/*; do
|
|||||||
--dump-config short \
|
--dump-config short \
|
||||||
${CMDLINE} \
|
${CMDLINE} \
|
||||||
| "${FILTER}" > "${DATA_DIR}/output.${testname}" \
|
| "${FILTER}" > "${DATA_DIR}/output.${testname}" \
|
||||||
|| die "Failure: Tor exited."
|
|| die "FAIL: Tor exited."
|
||||||
|
|
||||||
if cmp "$EXPECTED" "${DATA_DIR}/output.${testname}">/dev/null ; then
|
if cmp "$EXPECTED" "${DATA_DIR}/output.${testname}">/dev/null ; then
|
||||||
# Check round-trip.
|
# Check round-trip.
|
||||||
@ -196,11 +196,11 @@ for dir in "${EXAMPLEDIR}"/*; do
|
|||||||
--dump-config short \
|
--dump-config short \
|
||||||
| "${FILTER}" \
|
| "${FILTER}" \
|
||||||
> "${DATA_DIR}/output_2.${testname}" \
|
> "${DATA_DIR}/output_2.${testname}" \
|
||||||
|| die "Failure: Tor exited on round-trip."
|
|| die "FAIL: Tor exited on round-trip."
|
||||||
|
|
||||||
if ! cmp "${DATA_DIR}/output.${testname}" \
|
if ! cmp "${DATA_DIR}/output.${testname}" \
|
||||||
"${DATA_DIR}/output_2.${testname}"; then
|
"${DATA_DIR}/output_2.${testname}"; then
|
||||||
echo "Failure: did not match on round-trip." >&2
|
echo "FAIL: did not match on round-trip." >&2
|
||||||
exit $EXITCODE
|
exit $EXITCODE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ for dir in "${EXAMPLEDIR}"/*; do
|
|||||||
--verify-config \
|
--verify-config \
|
||||||
${CMDLINE} || true
|
${CMDLINE} || true
|
||||||
fi
|
fi
|
||||||
echo "Failure: did not match." >&2
|
echo "FAIL: did not match." >&2
|
||||||
diff -u "$EXPECTED" "${DATA_DIR}/output.${testname}" >&2 \
|
diff -u "$EXPECTED" "${DATA_DIR}/output.${testname}" >&2 \
|
||||||
|| true
|
|| true
|
||||||
exit $EXITCODE
|
exit $EXITCODE
|
||||||
@ -234,7 +234,7 @@ for dir in "${EXAMPLEDIR}"/*; do
|
|||||||
--defaults-torrc "${DEFAULTS}" \
|
--defaults-torrc "${DEFAULTS}" \
|
||||||
${CMDLINE} \
|
${CMDLINE} \
|
||||||
> "${DATA_DIR}/output.${testname}" \
|
> "${DATA_DIR}/output.${testname}" \
|
||||||
&& die "Failure: Tor did not report an error."
|
&& die "FAIL: Tor did not report an error."
|
||||||
|
|
||||||
expect_err="$(cat $ERROR)"
|
expect_err="$(cat $ERROR)"
|
||||||
if grep "${expect_err}" "${DATA_DIR}/output.${testname}" >/dev/null; then
|
if grep "${expect_err}" "${DATA_DIR}/output.${testname}" >/dev/null; then
|
||||||
|
Loading…
Reference in New Issue
Block a user