Browse Source

Fail if a requested test is not found

Hamilton Turner 10 years ago
parent
commit
3ca44ce112
1 changed files with 7 additions and 0 deletions
  1. 7 0
      toolset/benchmark/utils.py

+ 7 - 0
toolset/benchmark/utils.py

@@ -86,6 +86,13 @@ def gather_tests(include = [], exclude=[], benchmarker=None):
         # not listed there, so we ignore it
         pass
 
+  # Ensure we were able to locate everything that was 
+  # explicitly included 
+  names = {test.name for test in tests}
+  if 0 != len(set(include) - set(names)):
+    missing = list(set(include) - set(names))
+    raise Exception("Unable to locate tests %s" % missing)
+
   tests.sort(key=lambda x: x.name)
   return tests