summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-11-27 20:33:15 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-11-28 11:57:58 +0100
commitc3d5c1292bac53ac14d8661d8ac76c5a79752016 (patch)
tree1b3c12d61a42b91cec60886dcec44a9d55440d99
parent9fc7e1386aade4cf0cd0e27354f47cde48253fb6 (diff)
tests/flip_test: use subtest infrastructure
To make the testnames easier to handle in scripts, replace all spaces with dashes. The important part is to not print anything to stdout when enumerating subtests, so protect the timestamp test with the right check. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/flip_test.c51
2 files changed, 29 insertions, 24 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index acfc48a8..5f4d6886 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -13,6 +13,7 @@ NOUVEAU_TESTS = \
endif
TESTS_progs_M = \
+ flip_test \
$(NULL)
TESTS_progs = \
@@ -81,7 +82,6 @@ TESTS_progs = \
drm_vma_limiter_cached \
sysfs_rc6_residency \
sysfs_rps \
- flip_test \
gem_wait_render_timeout \
gem_ctx_create \
gem_ctx_bad_destroy \
diff --git a/tests/flip_test.c b/tests/flip_test.c
index 5214da97..5ad62d11 100644
--- a/tests/flip_test.c
+++ b/tests/flip_test.c
@@ -969,50 +969,55 @@ int main(int argc, char **argv)
int flags;
const char *name;
} tests[] = {
- { 15, TEST_VBLANK | TEST_CHECK_TS, "wf-vblank" },
+ { 15, TEST_VBLANK | TEST_CHECK_TS, "wf_vblank" },
{ 15, TEST_VBLANK | TEST_VBLANK_BLOCK | TEST_CHECK_TS,
- "blocking wf-vblank" },
+ "blocking-wf_vblank" },
{ 5, TEST_VBLANK | TEST_VBLANK_ABSOLUTE,
- "absolute wf-vblank" },
+ "absolute-wf_vblank" },
{ 5, TEST_VBLANK | TEST_VBLANK_BLOCK | TEST_VBLANK_ABSOLUTE,
- "blocking absolute wf-vblank" },
- { 30, TEST_VBLANK | TEST_DPMS | TEST_EINVAL, "wf-vblank vs dpms" },
+ "blocking-absolute-wf_vblank" },
+ { 30, TEST_VBLANK | TEST_DPMS | TEST_EINVAL, "wf_vblank-vs-dpms" },
{ 30, TEST_VBLANK | TEST_DPMS | TEST_WITH_DUMMY_LOAD,
- "delayed wf-vblank vs dpms" },
- { 30, TEST_VBLANK | TEST_MODESET | TEST_EINVAL, "wf-vblank vs modeset" },
+ "delayed-wf_vblank-vs-dpms" },
+ { 30, TEST_VBLANK | TEST_MODESET | TEST_EINVAL, "wf_vblank-vs-modeset" },
{ 30, TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_LOAD,
- "delayed wf-vblank vs modeset" },
-
- { 15, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY , "plain flip" },
- { 30, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip vs dpms" },
- { 30, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_LOAD, "delayed flip vs dpms" },
- { 5, TEST_FLIP | TEST_PAN, "flip vs panning" },
- { 30, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_LOAD, "delayed flip vs panning" },
- { 30, TEST_FLIP | TEST_MODESET | TEST_EINVAL, "flip vs modeset" },
- { 30, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_LOAD, "delayed flip vs modeset" },
+ "delayed-wf_vblank-vs-modeset" },
+
+ { 15, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY , "plain-flip" },
+ { 30, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" },
+ { 30, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_LOAD, "delayed-flip-vs-dpms" },
+ { 5, TEST_FLIP | TEST_PAN, "flip-vs-panning" },
+ { 30, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_LOAD, "delayed-flip-vs-panning" },
+ { 30, TEST_FLIP | TEST_MODESET | TEST_EINVAL, "flip-vs-modeset" },
+ { 30, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_LOAD, "delayed-flip-vs-modeset" },
{ 5, TEST_FLIP | TEST_VBLANK_EXPIRED_SEQ,
- "flip vs. expired vblank" },
+ "flip-vs-expired-vblank" },
{ 15, TEST_FLIP | TEST_VBLANK | TEST_VBLANK_ABSOLUTE |
- TEST_CHECK_TS, "flip vs absolute wf-vblank" },
+ TEST_CHECK_TS, "flip-vs-absolute-wf_vblank" },
{ 15, TEST_FLIP | TEST_VBLANK | TEST_CHECK_TS,
- "flip vs wf-vblank" },
+ "flip-vs-wf_vblank" },
{ 15, TEST_FLIP | TEST_VBLANK | TEST_VBLANK_BLOCK |
- TEST_CHECK_TS, "flip vs blocking wf-vblank" },
+ TEST_CHECK_TS, "flip-vs-blocking-wf-vblank" },
};
int i;
+ drmtest_subtest_init(argc, argv);
+
drm_fd = drm_open_any();
- get_timestamp_format();
+ if (!drmtest_only_list_subtests())
+ get_timestamp_format();
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
devid = intel_get_drm_devid(drm_fd);
batch = intel_batchbuffer_alloc(bufmgr, devid);
for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
- printf("running testcase: %s\n", tests[i].name);
- run_test(tests[i].duration, tests[i].flags, tests[i].name);
+ if (drmtest_run_subtest(tests[i].name)) {
+ printf("running testcase: %s\n", tests[i].name);
+ run_test(tests[i].duration, tests[i].flags, tests[i].name);
+ }
}
close(drm_fd);