aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-07-08 20:40:41 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2019-07-09 22:03:58 +0300
commit4b1ab9679579889abd1a66de0737652c9faffbf1 (patch)
tree142a01d14974b2add2f525912b5d6dcd7e0bfd8c /run_tests.py
parent716140ddb4f108dac2c2395e24e9ca17d68593d5 (diff)
downloadmeson-4b1ab9679579889abd1a66de0737652c9faffbf1.zip
meson-4b1ab9679579889abd1a66de0737652c9faffbf1.tar.gz
meson-4b1ab9679579889abd1a66de0737652c9faffbf1.tar.bz2
Add command line argument to skip unit tests.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/run_tests.py b/run_tests.py
index f427736..051b91e 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -262,6 +262,7 @@ def main():
choices=backendlist)
parser.add_argument('--cross', default=False, dest='cross', action='store_true')
parser.add_argument('--failfast', action='store_true')
+ parser.add_argument('--no-unittests', action='store_true', default=False)
(options, _) = parser.parse_known_args()
# Enable coverage early...
enable_coverage = options.cov
@@ -273,6 +274,7 @@ def main():
returncode = 0
cross = options.cross
backend, _ = guess_backend(options.backend, shutil.which('msbuild'))
+ no_unittests = options.no_unittests
# Running on a developer machine? Be nice!
if not mesonlib.is_windows() and not mesonlib.is_haiku() and 'CI' not in os.environ:
os.nice(20)
@@ -314,12 +316,16 @@ def main():
returncode += subprocess.call(cmd, env=env)
if options.failfast and returncode != 0:
return returncode
- cmd = mesonlib.python_command + ['run_unittests.py', '-v']
- if options.failfast:
- cmd += ['--failfast']
- returncode += subprocess.call(cmd, env=env)
- if options.failfast and returncode != 0:
- return returncode
+ if no_unittests:
+ print('Skipping all unit tests.')
+ returncode = 0
+ else:
+ cmd = mesonlib.python_command + ['run_unittests.py', '-v']
+ if options.failfast:
+ cmd += ['--failfast']
+ returncode += subprocess.call(cmd, env=env)
+ if options.failfast and returncode != 0:
+ return returncode
cmd = mesonlib.python_command + ['run_project_tests.py'] + sys.argv[1:]
returncode += subprocess.call(cmd, env=env)
else: