Clean up TEST_TOR_BINARY so test-stem can have better dependencies

Fix #18240.  This version of the bug first appeared in
0.2.8.2-alpha.  0.2.8.1-alpha and earlier had a different bug.

Based on a patch from cypherpunks.
This commit is contained in:
Nick Mathewson 2016-04-05 11:47:37 -04:00
parent b46d126e64
commit a57ed38a8e
2 changed files with 13 additions and 8 deletions

View File

@ -19,9 +19,9 @@ AM_CFLAGS = @TOR_SYSTEMD_CFLAGS@
SHELL = @SHELL@ SHELL = @SHELL@
if COVERAGE_ENABLED if COVERAGE_ENABLED
TESTING_TOR_BINARY="$(top_builddir)/src/or/tor-cov" TESTING_TOR_BINARY=$(top_builddir)/src/or/tor-cov$(EXEEXT)
else else
TESTING_TOR_BINARY="$(top_builddir)/src/or/tor" TESTING_TOR_BINARY=$(top_builddir)/src/or/tor$(EXEEXT)
endif endif
include src/include.am include src/include.am
@ -93,7 +93,7 @@ need-chutney-path:
# Note that test-network requires a copy of Chutney in $CHUTNEY_PATH. # Note that test-network requires a copy of Chutney in $CHUTNEY_PATH.
# Chutney can be cloned from https://git.torproject.org/chutney.git . # Chutney can be cloned from https://git.torproject.org/chutney.git .
test-network: need-chutney-path all 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
@ -101,7 +101,7 @@ test-network: need-chutney-path all
# some IPv6 tests will fail without an IPv6 DNS server (see #16971 and #17011) # some IPv6 tests will fail without an IPv6 DNS server (see #16971 and #17011)
# only run mixed tests if we have a tor-stable binary # only run mixed tests if we have a tor-stable binary
# see #17015 for autodetection of different tor versions # see #17015 for autodetection of different tor versions
test-network-all: need-chutney-path all test-driver 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)
@flavors="$(TEST_CHUTNEY_FLAVORS)"; \ @flavors="$(TEST_CHUTNEY_FLAVORS)"; \
if ping6 -q -o ::1 >/dev/null 2>&1; then \ if ping6 -q -o ::1 >/dev/null 2>&1; then \
@ -134,11 +134,11 @@ need-stem-path:
exit 1; \ exit 1; \
fi fi
test-stem: need-stem-path all test-stem: need-stem-path $(TESTING_TOR_BINARY)
@$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor $(TESTING_TOR_BINARY) --all --log notice --target RUN_ALL; @$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor "$(TESTING_TOR_BINARY)" --all --log notice --target RUN_ALL;
test-stem-full: need-stem-path all test-stem-full: need-stem-path $(TESTING_TOR_BINARY)
@$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor $(TESTING_TOR_BINARY) --all --log notice --target RUN_ALL,ONLINE -v; @$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor "$(TESTING_TOR_BINARY)" --all --log notice --target RUN_ALL,ONLINE -v;
test-full: need-stem-path need-chutney-path check test-network test-stem test-full: need-stem-path need-chutney-path check test-network test-stem

5
changes/bug18240 Normal file
View File

@ -0,0 +1,5 @@
o Minor bugfixes (build):
- Make the test-stem and test-network targets depend only on the
tor binary to be tested. Previously, they depended on "make all".
Fixes bug 18240; bugfix on 0.2.8.2-alpha.
Based on a patch from "cypherpunks".