summaryrefslogtreecommitdiff
path: root/tests/prime_nv_pcopy.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-14 16:02:24 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-14 16:08:00 +0200
commita1ca8ef5b1f44845bb2d0eada0123eb35b7e0b21 (patch)
tree7ebbf929d3c64a28312a082950f13e4eccfbc2dd /tests/prime_nv_pcopy.c
parentec283d6a52f49963b7f4d5d6582142f7f2025ded (diff)
tests: use igt_exit() consistently with subtests
This is mostly important to get the SKIP reporting right, but I've found a few stragglers that wanted to get converted over to the igt result reporting completely. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/prime_nv_pcopy.c')
-rw-r--r--tests/prime_nv_pcopy.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/prime_nv_pcopy.c b/tests/prime_nv_pcopy.c
index b7aad707..6b870c6c 100644
--- a/tests/prime_nv_pcopy.c
+++ b/tests/prime_nv_pcopy.c
@@ -1265,7 +1265,7 @@ out:
int main(int argc, char **argv)
{
- int ret, failed = 0, run = 0;
+ int ret;
igt_subtest_init(argc, argv);
@@ -1296,14 +1296,8 @@ int main(int argc, char **argv)
batch = intel_batchbuffer_alloc(bufmgr, devid);
#define xtest(x, args...) \
- igt_subtest( #x ) { \
- ret = ((x)(args)); \
- ++run; \
- if (ret) { \
- ++failed; \
- fprintf(stderr, "prime_pcopy: failed " #x "\n"); \
- } \
- }
+ igt_subtest( #x ) \
+ igt_assert(((x)(args)) == 0); \
xtest(test1_macro);
xtest(test1_micro);
@@ -1331,8 +1325,5 @@ int main(int argc, char **argv)
close(intel_fd);
close(nouveau_fd);
- if (!igt_only_list_subtests())
- printf("Tests: %u run, %u failed\n", run, failed);
-
- return failed;
+ igt_exit();
}