From 18bce476913de4deec18fcd028cb59d378c43812 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 7 Feb 2017 17:22:18 +0530 Subject: 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. --- run_tests.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'run_tests.py') diff --git a/run_tests.py b/run_tests.py index 6282440..f2038e4 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') -- cgit v1.1