[Piglit] [PATCH] profile.py: If the test list is empty after being filtered exit
Dylan Baker
baker.dylan.c at gmail.com
Mon Nov 3 17:26:06 PST 2014
Currently if the test list is empty an assertion will be raised in the
storage backend, this is a non-obvious message. This patch adds a quick
check that prints a nice message if there are not tests scheduled to
run.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
Brian, Does this trigger in your case?
framework/profile.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/framework/profile.py b/framework/profile.py
index 0d00e35..d3aba73 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -149,6 +149,11 @@ class TestProfile(object):
self.test_list = dict(item for item in self.test_list.iteritems()
if check_all(item))
+ if not self.test_list:
+ print('Error: There are no tests scheduled to run. Aborting run.',
+ file=sys.stderr)
+ sys.exit(1)
+
def _pre_run_hook(self):
""" Hook executed at the start of TestProfile.run
--
2.1.3
More information about the Piglit
mailing list