mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-23 14:23:03 +00:00
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>
This commit is contained in:
@@ -106,7 +106,11 @@ bool igt_only_list_subtests(void);
|
||||
void igt_skip(void);
|
||||
void igt_success(void);
|
||||
void igt_fail(int exitcode) __attribute__((noreturn));
|
||||
void __igt_fail_assert(int exitcode, const char *file,
|
||||
const int line, const char *func, const char *assertion)
|
||||
__attribute__((noreturn));
|
||||
void igt_exit(void);
|
||||
#define igt_assert(expr) do { if (!(expr)) __igt_fail_assert(99, __FILE__, __LINE__, __func__, #expr ); } while (0)
|
||||
|
||||
/* check functions which auto-skip tests by calling igt_skip() */
|
||||
void gem_check_caching(int fd);
|
||||
|
||||
Reference in New Issue
Block a user