From b0826346a64e58b81e00ec6fcb0d2b75b302c0d3 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 27 Feb 2019 07:51:52 -0500 Subject: Travis: control "make check" with its own flag Previously we had "make check" launched whenever DISTCHECK was false. Now we'd like to turn it off in a few other circumstances, like running chutney. Maybe stem too? --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 456b5abc56..a6727923d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ matrix: ## We run coverage with hardening off, which seems like enough # - env: HARDENING_OPTIONS="" ## We check asciidoc with distcheck, to make sure we remove doc products - - env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" + - env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" SKIP_MAKE_CHECK="yes" ## Uncomment to allow the build to report success (with non-required ## sub-builds continuing to run) if all required sub-builds have @@ -153,7 +153,7 @@ script: - echo "Configure flags are $CONFIGURE_FLAGS" - ./configure $CONFIGURE_FLAGS ## We run `make check` because that's what https://jenkins.torproject.org does. - - if [[ "$DISTCHECK" == "" ]]; then make check; fi + - if [[ "$SKIP_MAKE_CHECK" == "" ]]; then make check; fi - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi ## If this build was one that produced coverage, upload it. - if [[ "$COVERAGE_OPTIONS" != "" ]]; then coveralls -b . --exclude src/test --exclude src/trunnel --gcov-options '\-p' || echo "Coverage failed"; fi @@ -163,7 +163,7 @@ after_failure: ## But the log is too long for travis' rendered view, so tail it. - tail -1000 config.log || echo "tail failed" ## `make check` will leave a log file with more details of test failures. - - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log || echo "cat failed"; fi + - if [[ "$SKIP_MAKE_CHECK" == "" ]]; then cat test-suite.log || echo "cat failed"; fi ## `make distcheck` puts it somewhere different. - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog || echo "make failed"; fi -- cgit v1.2.3-54-g00ecf From 63325c05964ca5906aad4b51a53a5dc471fc7347 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 27 Feb 2019 07:59:39 -0500 Subject: Add a chutney mode to travis.yml. --- .travis.yml | 8 +++++++- changes/chutney_ci | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 changes/chutney_ci diff --git a/.travis.yml b/.travis.yml index a6727923d0..a8ad1f122f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,10 @@ matrix: # - env: HARDENING_OPTIONS="" ## We check asciidoc with distcheck, to make sure we remove doc products - env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" SKIP_MAKE_CHECK="yes" + # We also try running a hardened clang build with chutney on Linux. + - env: CHUTNEY="yes" SKIP_MAKE_CHECK="yes" CHUTNEY_ALLOW_FAILURES="2" + compiler: clang + os: linux ## Uncomment to allow the build to report success (with non-required ## sub-builds continuing to run) if all required sub-builds have @@ -142,7 +146,8 @@ install: - if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi ## If we're on OSX, and using asciidoc, configure asciidoc - if [[ "$ASCIIDOC_OPTIONS" == "" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"; fi - ## + ## If we're running chutney, install it. + - if [[ "$CHUTNEY" != "" ]]; then git clone --depth 1 https://github.com/torproject/chutney.git ; export CHUTNEY_PATH="$(pwd)/chutney"; fi ## Finally, list installed package versions - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi @@ -155,6 +160,7 @@ script: ## We run `make check` because that's what https://jenkins.torproject.org does. - if [[ "$SKIP_MAKE_CHECK" == "" ]]; then make check; fi - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi + - if [[ "$CHUTNEY" != "" ]]; then make test-network-all; fi ## If this build was one that produced coverage, upload it. - if [[ "$COVERAGE_OPTIONS" != "" ]]; then coveralls -b . --exclude src/test --exclude src/trunnel --gcov-options '\-p' || echo "Coverage failed"; fi diff --git a/changes/chutney_ci b/changes/chutney_ci new file mode 100644 index 0000000000..b17d587329 --- /dev/null +++ b/changes/chutney_ci @@ -0,0 +1,3 @@ + o Minor features (continuous integration): + - Our Travis configuration now uses Chutney to run some network + integration tests automatically. Closes ticket 29280. -- cgit v1.2.3-54-g00ecf From b26e3e4c565f4f764ee13a8afd5ea569547bc402 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 1 Jul 2019 14:05:26 +1000 Subject: Travis: show chutney logs on chutney job failure Part of 29280. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a8ad1f122f..cb1351a18e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -172,6 +172,7 @@ after_failure: - if [[ "$SKIP_MAKE_CHECK" == "" ]]; then cat test-suite.log || echo "cat failed"; fi ## `make distcheck` puts it somewhere different. - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog || echo "make failed"; fi + - if [[ "$CHUTNEY" != "" ]]; then ls test_network_log || echo "ls failed"; cat test_network_log/* || echo "cat failed"; fi before_cache: ## Delete all gcov files. -- cgit v1.2.3-54-g00ecf From ac7ce179834d8d97342fc17bc385730eccc109a8 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 1 Jul 2019 14:10:07 +1000 Subject: Travis: show the chutney commit and python version Part of 29280. --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index cb1351a18e..562036e51e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -151,6 +151,10 @@ install: ## Finally, list installed package versions - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi + ## Get python version + - python --version + ## If we're running chutney, show the chutney commit + - if [[ "$CHUTNEY" != "" ]]; then pushd "$CHUTNEY_PATH"; git log -1 ; popd ; fi script: - ./autogen.sh -- cgit v1.2.3-54-g00ecf From 75f9ae9029b4244658042ce7a4243202bfb4c527 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 1 Jul 2019 14:11:25 +1000 Subject: Travis: remove a redundant os: linux line Linux is the first item in the os matrix, so we don't need to specify it under matrix: include: . Part of 29280. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 562036e51e..190f43bd01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,6 @@ matrix: # We also try running a hardened clang build with chutney on Linux. - env: CHUTNEY="yes" SKIP_MAKE_CHECK="yes" CHUTNEY_ALLOW_FAILURES="2" compiler: clang - os: linux ## Uncomment to allow the build to report success (with non-required ## sub-builds continuing to run) if all required sub-builds have -- cgit v1.2.3-54-g00ecf