diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-14 18:02:46 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-14 18:02:46 +0200 |
commit | b3880d3a969656b78fe246e5ca4dd5a4a2c70ef5 (patch) | |
tree | 471f1d9f81ec5299615cf59cb1787afac09a5367 /tests/gem_linear_blits.c | |
parent | c3dd8a8c85b3e1a4329282cbe82fd7f387cd2643 (diff) |
tests: roll out igt_fixture
Also sprinkle igt_assert and igt_require over the setup code to clean
up code while at it. To avoid gcc getting upset about unitialized
variables just move them out of main as global data (where they always
get initialized to 0) - gcc can't see through our igt_fixture and
igt_subtest maze properly.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_linear_blits.c')
-rw-r--r-- | tests/gem_linear_blits.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c index b88b5839..62b636e1 100644 --- a/tests/gem_linear_blits.c +++ b/tests/gem_linear_blits.c @@ -237,15 +237,15 @@ static void run_test(int fd, int count) int main(int argc, char **argv) { - int fd, count = 0; + int fd = 0, count = 0; igt_skip_on_simulation(); igt_subtest_init(argc, argv); - fd = drm_open_any(); + igt_fixture { + fd = drm_open_any(); - if (!igt_only_list_subtests()) { if (argc > 1) count = atoi(argv[1]); if (count == 0) |