summaryrefslogtreecommitdiff
path: root/tests/prime_nv_test.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-31 16:23:26 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-01 21:10:59 +0100
commit071e9ca1ca4424ba35edec0246918efdd0528d76 (patch)
tree7606357a8f0116d17f2e30a74b274796ba83f3d8 /tests/prime_nv_test.c
parent223a61e12e119d96484ed05c563d1781fd613a4e (diff)
lib: add igt_main macro
In the past new testcases with subtest often forgot to add the call to igt_exit at the end of their main() function. That is now caught with a bit more obnoxious asserts, but it's still a nuissance. This little igt_main macro takes care of that (and also of calling the subtest machinery initialization code correctly). If no one objects I'll roll this out for all the simple cases (i.e. those tests that don't have additional argv parsing on top of the subtest machinery). v2: Roll it out across the board. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/prime_nv_test.c')
-rw-r--r--tests/prime_nv_test.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/prime_nv_test.c b/tests/prime_nv_test.c
index 7b40652f..18a13a0e 100644
--- a/tests/prime_nv_test.c
+++ b/tests/prime_nv_test.c
@@ -352,10 +352,8 @@ static void test_i915_blt_fill_nv_read(void)
/* test 9 nouveau copy engine?? */
-int main(int argc, char **argv)
+igt_main
{
- igt_subtest_init(argc, argv);
-
igt_fixture {
igt_assert(find_and_open_devices() == 0);
@@ -399,6 +397,4 @@ int main(int argc, char **argv)
close(intel_fd);
close(nouveau_fd);
}
-
- igt_exit();
}