From 4184aa0ff722c2d2a39c1f080e42fec17fc77820 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sun, 7 Oct 2018 18:41:05 +0300 Subject: [PATCH 1/6] Try running test-stem on travis --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index ec1748e67b..c62702f9a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,6 +51,8 @@ matrix: # - env: HARDENING_OPTIONS="" ## We check asciidoc with distcheck, to make sure we remove doc products - env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" + # We clone our stem repo and run `make test-stem` + - env: TEST_STEM="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="" @@ -203,6 +205,7 @@ script: - ./configure $CONFIGURE_FLAGS ## We run `make check` because that's what https://jenkins.torproject.org does. - if [[ "$DISTCHECK" == "" ]]; then make check; fi + - if [[ "$TEST_STEM" != "" ]]; then git clone --depth 1 https://github.com/torproject/stem.git ; export STEM_SOURCE_DIR=`pwd`/stem; make test-stem; fi - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi after_failure: From cf434b6c80fec69cc6ea7a12692847764ea55295 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Fri, 12 Oct 2018 11:02:58 +0300 Subject: [PATCH 2/6] Add changes file --- changes/ticket27913 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/ticket27913 diff --git a/changes/ticket27913 b/changes/ticket27913 new file mode 100644 index 0000000000..81ce725932 --- /dev/null +++ b/changes/ticket27913 @@ -0,0 +1,3 @@ + o Testing: + - Add new CI job to Travis configuration that runs stem-based + integration tests. Closes ticket 27913. From bee9093b556fb0381ef52680e25c94c0c337ace1 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Tue, 16 Oct 2018 13:11:42 +0300 Subject: [PATCH 3/6] Save time in CI test-stem job When running `make test-stem` on Travis, we should refrain from also running `make check`. Furthermore, let's limit compilation to src/app/tor target. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c62702f9a8..e0cb88c1ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -204,8 +204,8 @@ 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 [[ "$TEST_STEM" != "" ]]; then git clone --depth 1 https://github.com/torproject/stem.git ; export STEM_SOURCE_DIR=`pwd`/stem; make test-stem; fi + - if [[ "$DISTCHECK" == "" && "$TEST_STEM" == "" ]]; then make check; fi + - if [[ "$TEST_STEM" != "" ]]; then git clone --depth 1 https://github.com/torproject/stem.git ; export STEM_SOURCE_DIR=`pwd`/stem; make src/app/tor test-stem; fi - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi after_failure: From 4fd4e27163c0819a05d10d2d07c6646f32bf9235 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Fri, 19 Oct 2018 18:30:33 +0300 Subject: [PATCH 4/6] Try putting stem repo cloning into install part of config Also print stem version when we have it downloaded --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e0cb88c1ac..b044f98260 100644 --- a/.travis.yml +++ b/.travis.yml @@ -186,6 +186,7 @@ install: - if [[ "$RUST_OPTIONS" != "" ]]; then source $HOME/.cargo/env; fi ## 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 [[ "$TEST_STEM" != "" ]]; then git clone --depth 1 https://github.com/torproject/stem.git ; export STEM_SOURCE_DIR=`pwd`/stem; fi ## ## Finally, list installed package versions - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi @@ -197,6 +198,7 @@ install: - if [[ "$RUST_OPTIONS" != "" ]]; then rustup --version; fi - if [[ "$RUST_OPTIONS" != "" ]]; then rustc --version; fi - if [[ "$RUST_OPTIONS" != "" ]]; then cargo --version; fi + - if [[ "$TEST_STEM" != "" ]]; then pushd stem; python -c "from stem import stem; print(stem.__version__);"; popd; fi script: - ./autogen.sh @@ -205,7 +207,7 @@ script: - ./configure $CONFIGURE_FLAGS ## We run `make check` because that's what https://jenkins.torproject.org does. - if [[ "$DISTCHECK" == "" && "$TEST_STEM" == "" ]]; then make check; fi - - if [[ "$TEST_STEM" != "" ]]; then git clone --depth 1 https://github.com/torproject/stem.git ; export STEM_SOURCE_DIR=`pwd`/stem; make src/app/tor test-stem; fi + - if [[ "$TEST_STEM" != "" ]]; then make src/app/tor test-stem; fi - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi after_failure: From 739b22c23adb0a6b7391c2241d878a76b6a3b641 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Fri, 19 Oct 2018 21:19:39 +0300 Subject: [PATCH 5/6] Log stem commit id --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b044f98260..842e31cc71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -198,7 +198,7 @@ install: - if [[ "$RUST_OPTIONS" != "" ]]; then rustup --version; fi - if [[ "$RUST_OPTIONS" != "" ]]; then rustc --version; fi - if [[ "$RUST_OPTIONS" != "" ]]; then cargo --version; fi - - if [[ "$TEST_STEM" != "" ]]; then pushd stem; python -c "from stem import stem; print(stem.__version__);"; popd; fi + - if [[ "$TEST_STEM" != "" ]]; then pushd stem; python -c "from stem import stem; print(stem.__version__);"; git log -1; popd; fi script: - ./autogen.sh From ccdb7a1cf97a326fa2193a410a7b6d2ecf54d012 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Fri, 19 Oct 2018 21:40:12 +0300 Subject: [PATCH 6/6] Make sure we're not running distcheck and test-stem on the same CI job --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 842e31cc71..39ed6132cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -208,7 +208,7 @@ script: ## We run `make check` because that's what https://jenkins.torproject.org does. - if [[ "$DISTCHECK" == "" && "$TEST_STEM" == "" ]]; then make check; fi - if [[ "$TEST_STEM" != "" ]]; then make src/app/tor test-stem; fi - - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi + - if [[ "$DISTCHECK" != "" && "$TEST_STEM" == "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi after_failure: ## configure will leave a log file with more details of config failures.