Merge pull request #154 from PQClean/detect_travis_Cron

Detect cron builds on Travis CI
This commit is contained in:
Joost Rijneveld 2019-04-23 12:53:17 +02:00 committed by GitHub
commit 85be522a16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -12,7 +12,8 @@ matrix:
- git checkout $TRAVIS_BRANCH - git checkout $TRAVIS_BRANCH
- git reset --hard $TRAVIS_COMMIT - git reset --hard $TRAVIS_COMMIT
script: script:
- "cd test && python3 -m nose --rednose --verbose" # Use travis-wait to allow slower tests to run
- "cd test && travis_wait 30 python3 -m nose --rednose --verbose"
env: env:
PQCLEAN_ONLY_DIFF: 1 PQCLEAN_ONLY_DIFF: 1
addons: addons:
@ -41,7 +42,8 @@ matrix:
- ln -s /usr/local/bin/gcc-8 /usr/local/bin/gcc - ln -s /usr/local/bin/gcc-8 /usr/local/bin/gcc
- gcc --version - gcc --version
script: script:
- "cd test && python3 -m nose --rednose --verbose" # Use travis-wait to allow slower tests to run
- "cd test && travis_wait 30 python3 -m nose --rednose --verbose"
cache: pip cache: pip

View File

@ -85,7 +85,8 @@ def skip_windows(message="This test is not supported on Windows"):
def slow_test(f): def slow_test(f):
@functools.wraps(f) @functools.wraps(f)
def wrapper(*args, **kwargs): def wrapper(*args, **kwargs):
if 'CI' in os.environ and 'RUN_SLOW' not in os.environ: if ('CI' in os.environ and 'RUN_SLOW' not in os.environ and
os.environ.get('TRAVIS_EVENT_TYPE') != 'cron'):
raise unittest.SkipTest("Slow test skipped on CI run") raise unittest.SkipTest("Slow test skipped on CI run")
return f(*args, **kwargs) return f(*args, **kwargs)
return wrapper return wrapper