make: Improve the documentation for test-network-all

"make test-network-all" shows the warnings from each test-network.sh
run on the console, so developers see new warnings early.

Improve the documentation for this feature, and rename a Makefile
variable so the code is self-documenting.

Fixes bug 30455; bugfix on 0.3.0.4-rc.
This commit is contained in:
teor 2019-06-14 11:44:26 +10:00
parent ea14fb136c
commit e218da1722
No known key found for this signature in database
GPG Key ID: 10FEAA0E7075672A
2 changed files with 16 additions and 8 deletions

View File

@ -185,7 +185,7 @@ TEST_CFLAGS=
TEST_CPPFLAGS=-DTOR_UNIT_TESTS @TOR_MODULES_ALL_ENABLED@ TEST_CPPFLAGS=-DTOR_UNIT_TESTS @TOR_MODULES_ALL_ENABLED@
TEST_NETWORK_FLAGS=--hs-multi-client 1 TEST_NETWORK_FLAGS=--hs-multi-client 1
endif endif
TEST_NETWORK_WARNING_FLAGS=--quiet --only-warnings TEST_NETWORK_SHOW_WARNINGS_FOR_LAST_RUN_FLAGS=--quiet --only-warnings
if LIBFUZZER_ENABLED if LIBFUZZER_ENABLED
TEST_CFLAGS += -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div TEST_CFLAGS += -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div
@ -250,12 +250,15 @@ test-network: need-chutney-path $(TESTING_TOR_BINARY) src/tools/tor-gencert
$(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_FLAGS) $(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_FLAGS)
# Run all available tests using automake's test-driver # Run all available tests using automake's test-driver
# only run IPv6 tests if we can ping6 ::1 (localhost) # - only run IPv6 tests if we can ping6 or ping -6 ::1 (localhost)
# only run IPv6 tests if we can ping ::1 (localhost) # we try the syntax for BSD ping6, Linux ping6, and Linux ping -6,
# some IPv6 tests will fail without an IPv6 DNS server (see #16971 and #17011) # because they're incompatible
# only run mixed tests if we have a tor-stable binary # - some IPv6 tests may fail without an IPv6 DNS server
# Try the syntax for BSD ping6, Linux ping6, and Linux ping -6, # (see #16971 and #17011)
# because they're incompatible # - only run mixed tests if we have a tor-stable binary
# - show tor warnings on the console after each network run
# (otherwise, warnings go to the logs, and people don't see them unless
# there is a network failure)
test-network-all: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/tor-gencert test-network-all: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/tor-gencert
mkdir -p $(TEST_NETWORK_ALL_LOG_DIR) mkdir -p $(TEST_NETWORK_ALL_LOG_DIR)
rm -f $(TEST_NETWORK_ALL_LOG_DIR)/*.log $(TEST_NETWORK_ALL_LOG_DIR)/*.trs rm -f $(TEST_NETWORK_ALL_LOG_DIR)/*.log $(TEST_NETWORK_ALL_LOG_DIR)/*.trs
@ -279,7 +282,7 @@ test-network-all: need-chutney-path test-driver $(TESTING_TOR_BINARY) src/tools/
done; \ done; \
for f in $$flavors; do \ for f in $$flavors; do \
$(SHELL) $(top_srcdir)/test-driver --test-name $$f --log-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.log --trs-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.trs $(TEST_NETWORK_ALL_DRIVER_FLAGS) $(top_srcdir)/src/test/test-network.sh --flavor $$f $(TEST_NETWORK_FLAGS); \ $(SHELL) $(top_srcdir)/test-driver --test-name $$f --log-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.log --trs-file $(TEST_NETWORK_ALL_LOG_DIR)/$$f.trs $(TEST_NETWORK_ALL_DRIVER_FLAGS) $(top_srcdir)/src/test/test-network.sh --flavor $$f $(TEST_NETWORK_FLAGS); \
$(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_WARNING_FLAGS); \ $(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_SHOW_WARNINGS_FOR_LAST_RUN_FLAGS); \
done; \ done; \
echo "Log and result files are available in $(TEST_NETWORK_ALL_LOG_DIR)."; \ echo "Log and result files are available in $(TEST_NETWORK_ALL_LOG_DIR)."; \
! grep -q FAIL $(TEST_NETWORK_ALL_LOG_DIR)/*.trs ! grep -q FAIL $(TEST_NETWORK_ALL_LOG_DIR)/*.trs

5
changes/bug30455 Normal file
View File

@ -0,0 +1,5 @@
o Minor bugfixes (chutney, makefiles, documentation):
- "make test-network-all" shows the warnings from each test-network.sh
run on the console, so developers see new warnings early. Improve the
documentation for this feature, and rename a Makefile variable so the
code is self-documenting. Fixes bug 30455; bugfix on 0.3.0.4-rc.