tests/gem_flink: convert to subtest infrastructure
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 28 Nov 2012 11:17:40 +0000 (12:17 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 28 Nov 2012 11:17:40 +0000 (12:17 +0100)
tests/Makefile.am
tests/gem_flink.c

index 66c0ce5..ed3f077 100644 (file)
@@ -17,6 +17,7 @@ TESTS_progs_M = \
        gem_cacheing \
        gem_cpu_concurrent_blit \
        gem_cs_tlb \
+       gem_flink \
        flip_test \
        $(NULL)
 
@@ -30,7 +31,6 @@ TESTS_progs = \
        gem_exec_blt \
        gem_exec_bad_domains \
        gem_exec_faulting_reloc \
-       gem_flink \
        gem_readwrite \
        gem_ringfill \
        gem_mmap \
index c869480..885cdd4 100644 (file)
@@ -119,12 +119,18 @@ int main(int argc, char **argv)
 {
        int fd;
 
+       drmtest_subtest_init(argc, argv);
+
        fd = drm_open_any();
 
-       test_flink(fd);
-       test_double_flink(fd);
-       test_bad_flink(fd);
-       test_bad_open(fd);
+       if (drmtest_run_subtest("basic"))
+               test_flink(fd);
+       if (drmtest_run_subtest("double-flink"))
+               test_double_flink(fd);
+       if (drmtest_run_subtest("bad-flink"))
+               test_bad_flink(fd);
+       if (drmtest_run_subtest("bad-open"))
+               test_bad_open(fd);
 
        return 0;
 }