lib/drmtest: add igt_assert as a replacement for assert
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 13 Aug 2013 09:52:01 +0000 (11:52 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 13 Aug 2013 13:07:01 +0000 (15:07 +0200)
commit646a6fefbc2f11df9d25811c317d1f05aa21da45
tree3bf36ec427c803a710d3ae7fc30d5f5615f4a086
parentc67ebf413a45dd225049b14562fd76d2bbc444e2
lib/drmtest: add igt_assert as a replacement for assert

The aim is that we keep on running subtests even when a not-too-lethal
assert failed in a subtest. To make that useful also print per-subtest
test results from igt_skip|fail|success functions.

If required we can always go googletest-nuts with different types of
asserts later on, but I think for now we're good with what we have
here.

v2: Also print out proper SKIP message when skipping all subsequent
tests since a global (i.e. outside of a subtest) init step failed and
resulted in an igt_skip call.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
lib/drmtest.c
lib/drmtest.h