Skip to content

Commit

Permalink
travis: Run shorter tests on macOS to work around timeouts.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottslaughter committed Sep 1, 2017
1 parent 7f235fd commit d724326
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,8 @@ before_install:
popd
fi
script:
- |
if [[ "$(uname)" = "Darwin" ]]; then
export SHORT=1 # FIXME: macOS tests take too long, workaround by running short tests
fi
- ./test.py -j2
8 changes: 5 additions & 3 deletions language/travis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
from __future__ import print_function
import argparse, os, platform, subprocess

def test(root_dir, install_only, debug, spy, gcov, hdf5, openmp, env):
def test(root_dir, install_only, debug, short, spy, gcov, hdf5, openmp, env):
threads = ['-j', '2'] if 'TRAVIS' in env else []
terra = ['--with-terra', env['TERRA_DIR']] if 'TERRA_DIR' in env else []
debug_flag = ['--debug'] if debug else []
short_flag = ['--short'] if short else []
inner_flag = ['--extra=-flegion-inner', '--extra=0'] if 'DISABLE_INNER' in env else []
if 'USE_RDIR' in env:
regent_dir = os.path.dirname(os.path.realpath(__file__))
Expand All @@ -46,7 +47,7 @@ def test(root_dir, install_only, debug, spy, gcov, hdf5, openmp, env):
if not spy and not gcov and not hdf5 and not openmp: extra_flags.append('--debug')

subprocess.check_call(
['time', './test.py', '-q'] + threads + extra_flags + inner_flag,
['time', './test.py', '-q'] + threads + short + extra_flags + inner_flag,
env = env,
cwd = root_dir)

Expand All @@ -69,8 +70,9 @@ def test(root_dir, install_only, debug, spy, gcov, hdf5, openmp, env):
})

debug = env['DEBUG'] == '1'
short = 'SHORT' in env and env['SHORT'] == '1'
spy = 'TEST_SPY' in env and env['TEST_SPY'] == '1'
gcov = 'TEST_GCOV' in env and env['TEST_GCOV'] == '1'
hdf5 = 'TEST_HDF' in env and env['TEST_HDF'] == '1'
openmp = 'TEST_OPENMP' in env and env['TEST_OPENMP'] == '1'
test(root_dir, args.install_only, debug, spy, gcov, hdf5, openmp, env)
test(root_dir, args.install_only, debug, short, spy, gcov, hdf5, openmp, env)

0 comments on commit d724326

Please sign in to comment.