]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Show test-suite.log for distcheck on Travis CI
authorTaylor Yu <catalyst@torproject.org>
Thu, 26 Apr 2018 19:22:52 +0000 (14:22 -0500)
committerTaylor Yu <catalyst@torproject.org>
Thu, 26 Apr 2018 20:35:47 +0000 (15:35 -0500)
When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place.  Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml.  Fixes bug 25814; bug not in any
released Tor.

.travis.yml
Makefile.am

index 6da3027b85fa80f319fa2a00b68a94e2d4bfe526..6a3e1bfc01d60b48128859f832432a10772e9c5c 100644 (file)
@@ -125,7 +125,9 @@ script:
 
 after_failure:
   ## `make check` will leave a log file with more details of test failures.
-  - cat test-suite.log
+  - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi
+  ## `make distcheck` puts it somewhere different.
+  - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi
 
 after_success:
   ## If this build was one that produced coverage, upload it.
index f400728bacb9fd821707328e2f7dc5abc4f69b85..f06d0e37341167e20c138be8cee9f7648fce0591 100644 (file)
@@ -216,3 +216,12 @@ mostlyclean-local:
        rm -rf $(HTML_COVER_DIR)
        rm -rf $(top_builddir)/doc/doxygen
        rm -rf $(TEST_NETWORK_ALL_LOG_DIR)
+
+# This relies on some internal details of how automake implements
+# distcheck.  We check two directories because automake-1.15 changed
+# from $(distdir)/_build to $(distdir)/_build/sub.
+show-distdir-testlog:
+       @if test -d "$(distdir)/_build/sub"; then \
+         cat $(distdir)/_build/sub/$(TEST_SUITE_LOG); \
+       else \
+         cat $(distdir)/_build/$(TEST_SUITE_LOG); fi