diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-27 20:33:15 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-27 20:33:29 +0100 |
commit | 842242634000099d1a129c5009dbdd55a202439f (patch) | |
tree | 5290db8b436501848ca6f9060c1d5ba8147759c6 | |
parent | dbdc46616e2bc4d0edbff547f1df8429f4f76fdb (diff) |
tests/flip_test: use subtest infrastructurepiglit
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.am | 2 | ||||
-rw-r--r-- | tests/flip_test.c | 51 |
2 files changed, 29 insertions, 24 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index ff6e8294..f4a3abb1 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); |