summaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-02-07 17:22:18 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-02-18 02:38:54 +0530
commit18bce476913de4deec18fcd028cb59d378c43812 (patch)
treee0c561119bc89ea4b98ffc6641a5028aa20556fc /run_tests.py
parentd5b494492481a4379174786237cbc4d7eb037373 (diff)
downloadmeson-18bce476913de4deec18fcd028cb59d378c43812.tar.gz
find_program: Correctly use scripts found in PATH
We also need to check whether the program found in PATH can be executed directly by Windows or if we need to figure out what the interpreter is and add it to the list. Also add `msc` to the list of extensions that can be executed natively Includes a project test and a unit test for this and all expected behaviours on Windows.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/run_tests.py b/run_tests.py
index 62824400a..f2038e4cb 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-# Copyright 2012-2016 The Meson development team
+# Copyright 2012-2017 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,10 +21,12 @@ from mesonbuild import mesonlib
if __name__ == '__main__':
returncode = 0
print('Running unittests.\n')
+ units = ['InternalTests', 'AllPlatformTests']
if mesonlib.is_linux():
- returncode += subprocess.call([sys.executable, 'run_unittests.py', '-v'])
- else:
- returncode += subprocess.call([sys.executable, 'run_unittests.py', '-v', 'InternalTests', 'AllPlatformTests'])
+ units += ['LinuxlikeTests']
+ elif mesonlib.is_windows():
+ units += ['WindowsTests']
+ returncode += subprocess.call([sys.executable, 'run_unittests.py', '-v'] + units)
# Ubuntu packages do not have a binary without -6 suffix.
if shutil.which('arm-linux-gnueabihf-gcc-6') and not platform.machine().startswith('arm'):
print('Running cross compilation tests.\n')