lib/drmtest: Add drmtest_subtest_block macro

Doesn't do more than an if (drmtest_run_test(name)) right now, but
as soon as we get a bit of infrastructure to handle test failures and
skipping, this will get more interesting.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2013-08-12 09:04:24 +02:00
parent 40ea6f4ea8
commit 9f6365e4ea
30 changed files with 123 additions and 118 deletions
+5 -3
View File
@@ -214,7 +214,7 @@ int main(int argc, char **argv)
drm_intel_bufmgr_gem_enable_reuse(bufmgr);
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
if (drmtest_run_subtest("blitter"))
drmtest_subtest_block("blitter")
fails += check_ring(bufmgr, batch, "blt", blt_copy);
/* Strictly only required on architectures with a separate BLT ring,
@@ -222,8 +222,10 @@ int main(int argc, char **argv)
*/
copy = get_render_copyfunc(batch->devid);
if (drmtest_run_subtest("render") && copy)
fails += check_ring(bufmgr, batch, "render", copy);
drmtest_subtest_block("render") {
if (copy)
fails += check_ring(bufmgr, batch, "render", copy);
}
intel_batchbuffer_free(batch);
drm_intel_bufmgr_destroy(bufmgr);