[v2,9/26] framework/programs/run: Only allow --test-list if one profile

Submitted by Dylan Baker on Oct. 27, 2016, 9:31 p.m.


Message ID b6e042c4b2606dc89e6192ea5af29028f389668f.1477603560.git-series.dylan@pnwbakers.com
State New
Headers show

Not browsing as part of any series.

Patch hide | download patch | download mbox

diff --git a/framework/programs/run.py b/framework/programs/run.py
index bf0cebe..73bdc9a 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -316,6 +316,10 @@  def run(input_):
     profile.results_dir = args.results_path
     # If a test list is provided then set the forced_test_list value.
     if args.test_list:
+        if len(args.test_profiles) != 1:
+            raise exceptions.PiglitFatalError(
+                'Unable to force a test list with more than one profile')
         with open(args.test_list) as test_list:
             # Strip newlines
             profile.forced_test_list = list([t.strip() for t in test_list])