[v4,10/27] framework/programs/run: Only allow --test-list if one profile

Submitted by Dylan Baker on Nov. 9, 2016, 8:53 p.m.


Message ID 20127d839f8127c93b6a2c72f8c8b267ae749ce3.1478724535.git-series.dylan@pnwbakers.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker Nov. 9, 2016, 8:53 p.m.
This limitation has basically always existed, but for the next patch to
function this is a requirement. This limitation will be properly fixed
in a follow up series (that was originally part of this series, but the
size and scope of the series got too big so this was split.)

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
 framework/programs/run.py | 4 ++++
 1 file changed, 4 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/framework/programs/run.py b/framework/programs/run.py
index b92de99..8af8448 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])