From e9f9a42c7a5346f2f0e77b0dc8a73b4c4b1b2bc5 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sun, 19 Feb 2017 04:44:36 +0530 Subject: [PATCH] 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. --- mesontest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesontest.py b/mesontest.py index 3545ed8b5..ff6baa1e1 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