run_tests: Run all cross tests together

There is a lot of overhead for each travis job, because docker pull
takes 3 minutes. Each cross test takes 3-4 minutes.

To make things worse, sometimes Dockerhub is slow and docker pull takes
longer than 3 minutes.
pull/3729/head
Nirbheek Chauhan 7 years ago committed by Nirbheek Chauhan
parent 1a5a18a3f3
commit 2d1fc25599
  1. 10
      .travis.yml
  2. 9
      run_tests.py

@ -33,16 +33,10 @@ matrix:
# Test cross builds separately, they do not use the global compiler # Test cross builds separately, they do not use the global compiler
- os: linux - os: linux
compiler: gcc compiler: gcc
env: RUN_TESTS_ARGS="--cross=arm" env: RUN_TESTS_ARGS="--cross"
- os: linux - os: linux
compiler: gcc compiler: gcc
env: RUN_TESTS_ARGS="--cross=arm" MESON_ARGS="--unity=on" env: RUN_TESTS_ARGS="--cross" MESON_ARGS="--unity=on"
- os: linux
compiler: gcc
env: RUN_TESTS_ARGS="--cross=mingw"
- os: linux
compiler: gcc
env: RUN_TESTS_ARGS="--cross=mingw" MESON_ARGS="--unity=on"
before_install: before_install:
- python ./skip_ci.py --base-branch-env=TRAVIS_BRANCH --is-pull-env=TRAVIS_PULL_REQUEST - python ./skip_ci.py --base-branch-env=TRAVIS_BRANCH --is-pull-env=TRAVIS_PULL_REQUEST

@ -211,12 +211,7 @@ if __name__ == '__main__':
elif arg == '--backend=xcode': elif arg == '--backend=xcode':
backend = Backend.xcode backend = Backend.xcode
if arg.startswith('--cross'): if arg.startswith('--cross'):
if arg == '--cross=arm': cross = True
cross = 'arm'
elif arg == '--cross=mingw':
cross = 'mingw'
else:
raise RuntimeError('Unknown cross tests selected')
# Running on a developer machine? Be nice! # Running on a developer machine? Be nice!
if not mesonlib.is_windows() and not mesonlib.is_haiku() and 'TRAVIS' not in os.environ: if not mesonlib.is_windows() and not mesonlib.is_haiku() and 'TRAVIS' not in os.environ:
os.nice(20) os.nice(20)
@ -254,11 +249,9 @@ if __name__ == '__main__':
returncode += subprocess.call(mesonlib.python_command + ['run_project_tests.py'] + sys.argv[1:], env=env) returncode += subprocess.call(mesonlib.python_command + ['run_project_tests.py'] + sys.argv[1:], env=env)
else: else:
cross_test_args = mesonlib.python_command + ['run_cross_test.py'] cross_test_args = mesonlib.python_command + ['run_cross_test.py']
if cross == 'arm':
print(mlog.bold('Running armhf cross tests.').get_text(mlog.colorize_console)) print(mlog.bold('Running armhf cross tests.').get_text(mlog.colorize_console))
print() print()
returncode += subprocess.call(cross_test_args + ['cross/ubuntu-armhf.txt'], env=env) returncode += subprocess.call(cross_test_args + ['cross/ubuntu-armhf.txt'], env=env)
elif cross == 'mingw':
print(mlog.bold('Running mingw-w64 64-bit cross tests.').get_text(mlog.colorize_console)) print(mlog.bold('Running mingw-w64 64-bit cross tests.').get_text(mlog.colorize_console))
print() print()
returncode += subprocess.call(cross_test_args + ['cross/linux-mingw-w64-64bit.txt'], env=env) returncode += subprocess.call(cross_test_args + ['cross/linux-mingw-w64-64bit.txt'], env=env)

Loading…
Cancel
Save