aboutsummaryrefslogtreecommitdiff
path: root/mesontest.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-02-19 04:44:36 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-02-19 23:13:32 +0530
commite9f9a42c7a5346f2f0e77b0dc8a73b4c4b1b2bc5 (patch)
treec4a50bf339e86539faece9074258c2e5e4aa7749 /mesontest.py
parent0cf18eb3bc6f872324971610f92d54d63049b9c9 (diff)
downloadmeson-e9f9a42c7a5346f2f0e77b0dc8a73b4c4b1b2bc5.zip
meson-e9f9a42c7a5346f2f0e77b0dc8a73b4c4b1b2bc5.tar.gz
meson-e9f9a42c7a5346f2f0e77b0dc8a73b4c4b1b2bc5.tar.bz2
mesontest: Don't run tests if no tests were selected
The output is very confusing otherwise. Before it said 'No suitable tests defined' and then showed a list of tests that passed/failed. Now it will just say 'No suitable tests defined' and exit.
Diffstat (limited to 'mesontest.py')
-rwxr-xr-xmesontest.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesontest.py b/mesontest.py
index 3545ed8..ff6baa1 100755
--- a/mesontest.py
+++ b/mesontest.py
@@ -519,6 +519,8 @@ TIMEOUT: %4d
if os.path.isfile('build.ninja'):
subprocess.check_call([environment.detect_ninja(), 'all'])
tests = self.get_tests()
+ if not tests:
+ return 0
self.run_tests(tests)
return self.fail_count