7 # emulate realpath(), in case coreutils or equivalent is not installed.
15 base
="/$(basename "$f")"
17 dir
="$(cd "$dir" && pwd)"
21 UNAME_OS
=$
(uname
-s | cut
-d_ -f1)
22 if test "$UNAME_OS" = 'CYGWIN' || \
23 test "$UNAME_OS" = 'MSYS' || \
24 test "$UNAME_OS" = 'MINGW'; then
25 if test "$APPVEYOR" = 'True'; then
26 echo "This test is disabled on Windows CI, as it requires firewall exemptions. Skipping." >&2
36 TOR_BINARY
="${TESTING_TOR_BINARY:-./src/app/tor}"
39 TOR_BINARY
="$(abspath "$TOR_BINARY")"
41 echo "TOR BINARY IS ${TOR_BINARY}"
43 if "${TOR_BINARY}" --list-modules |
grep -q "relay: no"; then
44 echo "This test requires the relay module. Skipping." >&2
50 if [ -n "$tmpdir" ] && [ -d "$tmpdir" ]; then
55 trap clean EXIT HUP INT TERM
57 tmpdir
="$(mktemp -d -t tor_rebind_test.XXXXXX)"
58 if [ -z "$tmpdir" ]; then
59 echo >&2 mktemp failed
61 elif [ ! -d "$tmpdir" ]; then
62 echo >&2 mktemp failed to
make a directory
66 "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/test_rebind.py" "${TOR_BINARY}" "$tmpdir"