From: Kienan Stewart Date: Fri, 31 Jan 2025 15:55:16 +0000 (-0500) Subject: tests: Exit serial test runner gracefully when no tests are specified X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=a3ec5fe650e08aca7effc7e1c589ff7dcef79afe;p=lttng-tools.git tests: Exit serial test runner gracefully when no tests are specified This avoids the test failing when invoking make with `TESTS=xxx` to limit which tests are run. Change-Id: I89c7096a64acc68114d4ca2d0042a219c57ad23a Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tests.serial b/tests/regression/tests.serial index a99352fe1..c936309f6 100755 --- a/tests/regression/tests.serial +++ b/tests/regression/tests.serial @@ -191,5 +191,11 @@ if __name__ == "__main__": logging.info("Serial tests received %d tests", len(tests)) logging.debug("Serial tests: {}".format(tests)) + + if len(tests) == 0: + tap = lttngtest.TapGenerator(1) + tap.skip("No tests specified by the environment") + sys.exit(0) + if not run_tests(tests): sys.exit(1)