summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-02-11 12:14:09 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-02-11 12:14:09 +0100
commit333a5c6f07cba9e6d7a5506521bae5ec89b867c1 (patch)
treecd2a7f40e52d0f69721ddc5e21f004105230ff85 /lib/drmtest.c
parenta6bc3d91af816f4d979cb6424c6e991362c2a8f8 (diff)
lib/drmtest: Fix up skip_henceforth checks
We need to first check whether we'll even run the testcase before deciding to print a premature SKIP/FAIL. Without this and global skipped resulted in superflous output when running only one testcase. References: https://bugs.freedesktop.org/show_bug.cgi?id=74100 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index f4a86005..2718de4d 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -972,6 +972,10 @@ bool __igt_run_subtest(const char *subtest_name)
return false;
}
+ if (run_single_subtest &&
+ strcmp(subtest_name, run_single_subtest) != 0)
+ return false;
+
if (skip_subtests_henceforth) {
printf("Subtest %s: %s\n", subtest_name,
skip_subtests_henceforth == SKIP ?
@@ -979,14 +983,7 @@ bool __igt_run_subtest(const char *subtest_name)
return false;
}
- if (!run_single_subtest) {
- return (in_subtest = subtest_name);
- } else {
- if (strcmp(subtest_name, run_single_subtest) == 0)
- return (in_subtest = subtest_name);
-
- return false;
- }
+ return (in_subtest = subtest_name);
}
const char *igt_subtest_name(void)