From 47083f145aeefd574b1f1db42defe8632bc7e223 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 6 Dec 2016 20:48:48 -0500 Subject: [PATCH] Don't error if pytest skips all unit tests. --- test/runner/lib/executor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/runner/lib/executor.py b/test/runner/lib/executor.py index d7f68e05982..e48224cb9de 100644 --- a/test/runner/lib/executor.py +++ b/test/runner/lib/executor.py @@ -515,7 +515,13 @@ def command_units(args): for version, command, env in version_commands: display.info('Unit test with Python %s' % version) - intercept_command(args, command, env=env, python_version=version) + + try: + intercept_command(args, command, env=env, python_version=version) + except SubprocessError as ex: + # pytest exits with status code 5 when all tests are skipped, which isn't an error for our use case + if ex.status != 5: + raise def command_compile(args):