This works together with the new subtest infrastructure in intel-gpu-tools.
Signed-off-by: Daniel Vetter <[email protected]> --- tests/igt.tests | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tests/igt.tests b/tests/igt.tests index 863000a..3c9968f 100644 --- a/tests/igt.tests +++ b/tests/igt.tests @@ -46,8 +46,8 @@ igtTestRoot = path.join(path.realpath(path.join(testBinDir, 'igt')), 'tests') profile = TestProfile() class IGTTest(ExecTest): - def __init__(self, binary): - ExecTest.__init__(self, [path.join(igtTestRoot, binary)]) + def __init__(self, binary, arguments=[]): + ExecTest.__init__(self, [path.join(igtTestRoot, binary)] + arguments) def interpretResult(self, out, returncode, results): if returncode == 0: @@ -93,7 +93,23 @@ singleTests = listTests("list-single-tests") for test in singleTests: profile.test_list['igt/' + test] = IGTTest(test) +def addSubTestCases(test): + proc = subprocess.Popen( + [path.join(igtTestRoot, test), '--list-subtests' ], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + env=os.environ.copy(), + universal_newlines=True + ) + out, err = proc.communicate() + returncode = proc.returncode + + subtests = out.split("\n") + + for subtest in subtests: + profile.test_list['igt/' + test + '/' + subtest] = IGTTest(test, ['--run-subtest', subtest]) + multiTests = listTests("list-multi-tests") -for test in singleTests: - profile.test_list['igt/' + test] = IGTTest(test) +for test in multiTests: + addSubTestCases(test) -- 1.7.11.7 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
