summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-09-21 20:10:11 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-10-11 12:13:55 +0200
commitdbbe155652f225810824c257710deb27b413adb4 (patch)
treea7a44279354cbea97c9de28d47edea1fa7ea8129
parent32e81d2569f77bb364bcf0193686d0c121f1185b (diff)
framework/deqp: allow loading a *-master.txt file as mustpass list
-rw-r--r--framework/test/deqp.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/framework/test/deqp.py b/framework/test/deqp.py
index f62d731b1..f54135b0e 100644
--- a/framework/test/deqp.py
+++ b/framework/test/deqp.py
@@ -76,7 +76,17 @@ _EXTRA_ARGS = get_option('PIGLIT_DEQP_EXTRA_ARGS',
def select_source(bin_, filename, mustpass, extra_args):
"""Return either the mustpass list or the generated list."""
if options.OPTIONS.deqp_mustpass:
- return gen_mustpass_tests(mustpass)
+ if mustpass.endswith('.xml'):
+ return gen_mustpass_tests_xml(mustpass)
+
+ # Load a *-master.txt list.
+ tests = []
+ with open(mustpass, 'r') as filp:
+ for line in filp:
+ line = line.strip()
+ if line:
+ tests.append(line)
+ return tests
else:
return iter_deqp_test_cases(
gen_caselist_txt(bin_, filename, extra_args))
@@ -94,7 +104,7 @@ def make_profile(test_list, test_class):
return profile
-def gen_mustpass_tests(mp_list):
+def gen_mustpass_tests_xml(mp_list):
"""Return a testlist from the mustpass list."""
root = et.parse(mp_list).getroot()
group = []