summaryrefslogtreecommitdiff
path: root/tests/prime_nv_pcopy.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-15 15:38:31 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-15 15:57:20 +0100
commitc2e05af3538830f0fd1f0e750a99b2e10b84e991 (patch)
tree32c01ea3fa20c21c3b1270d5bc31e0e8b8a1d5f0 /tests/prime_nv_pcopy.c
parentcc4eeb990f0378f2e3166c4d03699d4873747c38 (diff)
tests/prime_nv_pcopy: convert to subtests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/prime_nv_pcopy.c')
-rw-r--r--tests/prime_nv_pcopy.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/prime_nv_pcopy.c b/tests/prime_nv_pcopy.c
index 7ed5cf4f..dc16f7a1 100644
--- a/tests/prime_nv_pcopy.c
+++ b/tests/prime_nv_pcopy.c
@@ -28,6 +28,7 @@
#include "nouveau.h"
#include "intel_gpu_tools.h"
#include "intel_batchbuffer.h"
+#include "drmtest.h"
static int intel_fd = -1, nouveau_fd = -1;
static drm_intel_bufmgr *bufmgr;
@@ -1266,13 +1267,16 @@ int main(int argc, char **argv)
{
int ret, failed = 0, run = 0;
+ drmtest_subtest_init(argc, argv);
+
ret = find_and_open_devices();
if (ret < 0)
return ret;
if (nouveau_fd == -1 || intel_fd == -1) {
fprintf(stderr,"failed to find intel and nouveau GPU\n");
- return 77;
+ if (!drmtest_only_list_subtests())
+ return 77;
}
/* set up intel bufmgr */
@@ -1292,6 +1296,7 @@ int main(int argc, char **argv)
batch = intel_batchbuffer_alloc(bufmgr, devid);
#define xtest(x, args...) do { \
+ if (!drmtest_run_subtest( #x )) break; \
ret = ((x)(args)); \
++run; \
if (ret) { \