tor/src/test/test_zero_length_keys.sh
teor 012c44538c
test: Skip test scripts that require the relay module
When tor is built without the relay module.

Part of 32123.
2019-10-20 19:26:59 +10:00

15 lines
594 B
Bash
Executable file

#!/bin/sh
# Check that tor regenerates keys when key files are zero-length
if "${builddir:-.}/src/app/tor" --list-modules | grep -q "relay: no"; then
echo "This test requires the relay module. Skipping." >&2
exit 77
fi
exitcode=0
"${SHELL:-sh}" "${abs_top_srcdir:-.}/src/test/zero_length_keys.sh" "${builddir:-.}/src/app/tor" -z || exitcode=1
"${SHELL:-sh}" "${abs_top_srcdir:-.}/src/test/zero_length_keys.sh" "${builddir:-.}/src/app/tor" -d || exitcode=1
"${SHELL:-sh}" "${abs_top_srcdir:-.}/src/test/zero_length_keys.sh" "${builddir:-.}/src/app/tor" -e || exitcode=1
exit ${exitcode}