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

index 8c96b51..5c6bc0f 100644 (file)
@@ -20,6 +20,7 @@ TESTS_progs_M = \
        gem_flink \
        gem_gtt_concurrent_blit \
        gem_mmap_gtt \
+       gem_partial_pwrite_pread \
        flip_test \
        $(NULL)
 
@@ -47,7 +48,6 @@ TESTS_progs = \
        gem_tiled_pread_pwrite \
        gem_tiled_partial_pwrite_pread \
        gem_tiled_swapping \
-       gem_partial_pwrite_pread \
        gem_linear_blits \
        gem_vmap_blits \
        gem_threaded_access_tiled \
index 81fcdf5..f6fbdbf 100644 (file)
@@ -257,6 +257,8 @@ int main(int argc, char **argv)
 {
        srandom(0xdeadbeef);
 
+       drmtest_subtest_init(argc, argv);
+
        fd = drm_open_any();
 
        bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
@@ -271,11 +273,14 @@ int main(int argc, char **argv)
        drmtest_init_aperture_trashers(bufmgr);
        mappable_gtt_limit = gem_mappable_aperture_size();
 
-       test_partial_reads();
+       if (drmtest_run_subtest("reads"))
+               test_partial_reads();
 
-       test_partial_writes();
+       if (drmtest_run_subtest("writes"))
+               test_partial_writes();
 
-       test_partial_read_writes();
+       if (drmtest_run_subtest("writes-after-reads"))
+               test_partial_read_writes();
 
        drmtest_cleanup_aperture_trashers();
        drm_intel_bufmgr_destroy(bufmgr);