diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2020-09-08 19:27:20 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-09-10 07:20:41 +0000 |
commit | 36600d7465e854c6f3d7fc824a7fa5d4415a6292 (patch) | |
tree | 3b9db2b28deea970946bb4747d932b78cd5ef654 /run_cross_test.py | |
parent | 1480fdfa9a2cfebe2399c930d2966a3ad5aa0d82 (diff) | |
download | meson-36600d7465e854c6f3d7fc824a7fa5d4415a6292.zip meson-36600d7465e854c6f3d7fc824a7fa5d4415a6292.tar.gz meson-36600d7465e854c6f3d7fc824a7fa5d4415a6292.tar.bz2 |
Add a test run in an environment which only has a cross compiler
Add '--cross-only' option to run_tests.py, so we can arrange not to run
tests in the 'native' suite when only a cross-compiler is available, as
they can't succeed.
Diffstat (limited to 'run_cross_test.py')
-rwxr-xr-x | run_cross_test.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/run_cross_test.py b/run_cross_test.py index 269eb01..70db667 100755 --- a/run_cross_test.py +++ b/run_cross_test.py @@ -25,17 +25,20 @@ from mesonbuild import mesonlib from mesonbuild.coredata import version as meson_version -def runtests(cross_file, failfast): - tests = ['--only', 'common', 'native'] +def runtests(cross_file, failfast, cross_only): + tests = ['--only', 'common'] + if not cross_only: + tests.append('native') cmd = mesonlib.python_command + ['run_project_tests.py', '--backend', 'ninja'] + (['--failfast'] if failfast else []) + tests + ['--cross-file', cross_file] return subprocess.call(cmd) def main(): parser = argparse.ArgumentParser() parser.add_argument('--failfast', action='store_true') + parser.add_argument('--cross-only', action='store_true') parser.add_argument('cross_file') options = parser.parse_args() - return runtests(options.cross_file, options.failfast) + return runtests(options.cross_file, options.failfast, options.cross_only) if __name__ == '__main__': print('Meson build system', meson_version, 'Cross Tests') |