commit 2e69c92783f24d781066df2b297190ee95214e91 Author: teor teor@torproject.org Date: Mon Dec 2 13:31:52 2019 +1000
test: Move tests from .travis.yml into test.sh
This change makes it easier to run the travis tests locally.
Part of 28863. --- .travis.yml | 11 ++--------- test.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/.travis.yml b/.travis.yml index d26ed93..b7bfc94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -117,15 +117,8 @@ install:
script: ## Run some fallback-scripts tests - ## moria1, Serge, no caches extra info, no dir port, doesn't exist - ## TODO: validate output from all 3 commands using grep, grep, and stem? - - $PYTHON generateFallbackDirLine.py 9695DFC35FFEB861329B9F1AB04C46397020CE31 BA44A889E64B93FAA2B114E02C2A279A8555C533 001524DD403D729F08F7E5D77813EF12756CFA8D 5AFAC3D00E97D6733112CC9CA2A788691FA87125 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - - $PYTHON lookupFallbackDirContact.py 9695DFC35FFEB861329B9F1AB04C46397020CE31 BA44A889E64B93FAA2B114E02C2A279A8555C533 001524DD403D729F08F7E5D77813EF12756CFA8D 5AFAC3D00E97D6733112CC9CA2A788691FA87125 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - ## If we get the top 200 relays from Onionoo, we generate a list with about - ## 10 fallbacks - - export TOR_FB_ONIONOO_LIMIT=200 - ## Hide info-level logs - - $PYTHON updateFallbackDirs.py 2>&1 | tee -a fallback.log | grep -v "INFO::" + ## Outputs fallback.log with info-level logs + - ./test.sh
after_failure: ## Show all the output, including info-level logs diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..a6bd19a --- /dev/null +++ b/test.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -v +set -e + +# Use the default python spelling, if the user hasn't specified one +PYTHON=${PYTHON:-python} + +## moria1, Serge, no caches extra info, no dir port, doesn't exist +## TODO: validate output from all 3 commands using grep, grep, and stem? +$PYTHON generateFallbackDirLine.py 9695DFC35FFEB861329B9F1AB04C46397020CE31 BA44A889E64B93FAA2B114E02C2A279A8555C533 001524DD403D729F08F7E5D77813EF12756CFA8D 5AFAC3D00E97D6733112CC9CA2A788691FA87125 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +$PYTHON lookupFallbackDirContact.py 9695DFC35FFEB861329B9F1AB04C46397020CE31 BA44A889E64B93FAA2B114E02C2A279A8555C533 001524DD403D729F08F7E5D77813EF12756CFA8D 5AFAC3D00E97D6733112CC9CA2A788691FA87125 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + +## If we get the top 200 relays from Onionoo, we generate a list with about +## 10 fallbacks +export TOR_FB_ONIONOO_LIMIT=200 +## Hide info-level logs +$PYTHON updateFallbackDirs.py 2>&1 | tee -a fallback.log | grep -v "INFO::"