summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorMicah Elizabeth Scott <beth@torproject.org>2023-03-08 15:44:55 -0800
committerMicah Elizabeth Scott <beth@torproject.org>2023-05-10 07:38:28 -0700
commitdcb9c4df67d116dc16f5361c8e4cd6e21fbb9abf (patch)
treee99810169c841c6cb74036d22a59dc4ccdf014a4 /src/test
parent9d1a57397739b869ab102783b858889bcc2e5066 (diff)
downloadtor-dcb9c4df67d116dc16f5361c8e4cd6e21fbb9abf.tar.gz
tor-dcb9c4df67d116dc16f5361c8e4cd6e21fbb9abf.zip
hs_pow: Make proof-of-work support optional in configure
This adds a new "pow" module for the user-visible proof of work support in ./configure, and this disables src/feature/hs/hs_pow at compile-time. Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/test_parseconf.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test_parseconf.sh b/src/test/test_parseconf.sh
index c02b8b23c0..85a8cbbf0c 100755
--- a/src/test/test_parseconf.sh
+++ b/src/test/test_parseconf.sh
@@ -98,6 +98,9 @@
# want to encode that knowledge in this test script, so we supply a
# separate result file for every combination of disabled modules that
# has a different result.)
+#
+# This logic ignores modules that are not listed by --list-modules
+# (dircache) and some that do not currently affect config parsing (pow).
umask 077
set -e
@@ -197,6 +200,8 @@ echo "This pattern should not match any log messages" \
"$NON_EMPTY"
STANDARD_LIBS="libevent\\|openssl\\|zlib"
+MODULES_WITHOUT_CONFIG_TESTS="dircache\\|pow"
+
# Lib names are restricted to [a-z0-9]* at the moment
# We don't actually want to support foreign accents here
# shellcheck disable=SC2018,SC2019
@@ -229,6 +234,7 @@ TOR_LIBS_ENABLED_SEARCH="$(echo "$TOR_LIBS_ENABLED_SEARCH" | tr ' ' '\n' \
| grep -v '^_*$' | tr '\n' ' ')"
TOR_MODULES_DISABLED="$("$TOR_BINARY" --list-modules | grep ': no' \
+ | grep -v "$MODULES_WITHOUT_CONFIG_TESTS" \
| cut -d ':' -f1 | sort | tr '\n' '_')"
# Remove the last underscore, if there is one
TOR_MODULES_DISABLED=${TOR_MODULES_DISABLED%_}