Skip to content

Commit

Permalink
Merge db10bd3 into d7a5fdc
Browse files Browse the repository at this point in the history
  • Loading branch information
nmathewson committed Mar 22, 2019
2 parents d7a5fdc + db10bd3 commit 4bdc97d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .travis.yml
Expand Up @@ -50,13 +50,17 @@ matrix:
## We run rust and 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"
## Check rust online with distcheck, to make sure we remove rust products
## But without hardening (see above)
- env: DISTCHECK="yes" RUST_OPTIONS="--enable-rust --enable-cargo-online-mode" HARDENING_OPTIONS=""
- env: DISTCHECK="yes" RUST_OPTIONS="--enable-rust --enable-cargo-online-mode" HARDENING_OPTIONS="" SKIP_MAKE_CHECK="yes"
## Check disable module dirauth with and without rust
- env: MODULES_OPTIONS="--disable-module-dirauth" RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true HARDENING_OPTIONS=""
- env: MODULES_OPTIONS="--disable-module-dirauth"
# We also try running a hardened clang build with chutney on Linux.
- env: CHUTNEY="yes" SKIP_MAKE_CHECK="yes"
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
Expand Down Expand Up @@ -182,6 +186,8 @@ install:
## If we're testing rust builds in offline-mode, then set up our vendored dependencies
- if [[ "$TOR_RUST_DEPENDENCIES" == "true" ]]; then export TOR_RUST_DEPENDENCIES=$PWD/src/ext/rust/crates; 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
Expand All @@ -199,15 +205,16 @@ 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 [[ "$CHUTNEY" != "" ]]; then make test-network-forgiving; fi

after_failure:
## configure will leave a log file with more details of config failures.
## 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

Expand Down
5 changes: 5 additions & 0 deletions Makefile.am
Expand Up @@ -70,6 +70,8 @@ TEST_CFLAGS += -fsanitize-coverage=trace-pc-guard,trace-cmp,trace-div
# not "edge"
endif

TEST_NETWORK_FORGIVING_FLAGS=--allow-failures 2

TEST_NETWORK_ALL_LOG_DIR=$(top_builddir)/test_network_log
TEST_NETWORK_ALL_DRIVER_FLAGS=--color-tests yes

Expand Down Expand Up @@ -118,6 +120,9 @@ need-chutney-path:
test-network: need-chutney-path $(TESTING_TOR_BINARY) src/tools/tor-gencert
$(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_FLAGS)

test-network-forgiving: need-chutney-path $(TESTING_TOR_BINARY) src/tools/tor-gencert
$(top_srcdir)/src/test/test-network.sh $(TEST_NETWORK_FLAGS) $(TEST_NETWORK_FORGIVING_FLAGS)

# 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 ping ::1 (localhost)
Expand Down
4 changes: 4 additions & 0 deletions changes/bug29703
@@ -0,0 +1,4 @@
o Minor bugfixes (testing):
- Backport the 0.3.4 src/test/test-network.sh to 0.2.9.
We need a recent test-network.sh to use new chutney features in CI.
Fixes bug 29703; bugfix on 0.2.9.1-alpha.
3 changes: 3 additions & 0 deletions 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.

0 comments on commit 4bdc97d

Please sign in to comment.