diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-10 10:18:32 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-12-10 10:18:32 +0100 |
commit | dda85fb108469e3d3c8ce19751f928c70e9fba4c (patch) | |
tree | a711eaada22dc9d1713922482e3680bedb10300e /tests/gem_media_fill.c | |
parent | ce1a9f918ef2415562bf441c2b7d886c6eb865c4 (diff) |
tests: roll out igt_simple_init/igt_simple_main
Also use igt_skip a bit more to simplify some of the tests.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_media_fill.c')
-rw-r--r-- | tests/gem_media_fill.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/tests/gem_media_fill.c b/tests/gem_media_fill.c index b458deda..1c3fe609 100644 --- a/tests/gem_media_fill.c +++ b/tests/gem_media_fill.c @@ -84,7 +84,7 @@ scratch_buf_check(data_t *data, struct scratch_buf *buf, int x, int y, } } -int main(int argc, char **argv) +igt_simple_main { data_t data = {0, }; struct intel_batchbuffer *batch = NULL; @@ -92,21 +92,19 @@ int main(int argc, char **argv) media_fillfunc_t media_fill = NULL; int i, j; - igt_fixture { - data.drm_fd = drm_open_any_render(); - data.devid = intel_get_drm_devid(data.drm_fd); + data.drm_fd = drm_open_any_render(); + data.devid = intel_get_drm_devid(data.drm_fd); - data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096); - igt_assert(data.bufmgr); + data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096); + igt_assert(data.bufmgr); - media_fill = get_media_fillfunc(data.devid); + media_fill = get_media_fillfunc(data.devid); - igt_require_f(media_fill, - "no media-fill function\n"); + igt_require_f(media_fill, + "no media-fill function\n"); - batch = intel_batchbuffer_alloc(data.bufmgr, data.devid); - igt_assert(batch); - } + batch = intel_batchbuffer_alloc(data.bufmgr, data.devid); + igt_assert(batch); scratch_buf_init(&data, &dst, WIDTH, HEIGHT, STRIDE, COLOR_C4); |