On 11/03/2014 06:26 PM, Dylan Baker wrote:
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 <[email protected]>
---

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



Reviewed-by: Brian Paul <[email protected]>

Thanks!

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to