mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-23 14:23:03 +00:00
lib/drmtest: skip fixtures after an igt_skip
This way we can just enclose all igt_skip/igt_require calls into fixtures even when we have subtests, and still output correct SKIP message for all of them. Wohoo, magic! The only thing which doesn't work yet is enumerating failed subtests, but I think that should work out on top of this. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
+5
-2
@@ -123,7 +123,6 @@ bool __igt_run_subtest(const char *subtest_name);
|
||||
(setjmp(igt_subtest_jmpbuf) == 0); \
|
||||
igt_success())
|
||||
const char *igt_subtest_name(void);
|
||||
bool igt_only_list_subtests(void);
|
||||
/**
|
||||
* igt_skip - subtest aware test skipping
|
||||
*
|
||||
@@ -176,6 +175,8 @@ void igt_exit(void) __attribute__((noreturn));
|
||||
*/
|
||||
#define igt_require(expr) do { if (!(expr)) __igt_skip_check(__FILE__, __LINE__, __func__, #expr ); } while (0)
|
||||
|
||||
bool __igt_fixture(void);
|
||||
void __igt_fixture_end(void) __attribute__((noreturn));
|
||||
/**
|
||||
* igt_fixture - annote global test fixture code
|
||||
*
|
||||
@@ -184,7 +185,9 @@ void igt_exit(void) __attribute__((noreturn));
|
||||
* enumeration (e.g. when enumerating on systemes without an intel gpu) such
|
||||
* blocks should be annotated with igt_fixture.
|
||||
*/
|
||||
#define igt_fixture if (!igt_only_list_subtests())
|
||||
#define igt_fixture for (; __igt_fixture() && \
|
||||
(setjmp(igt_subtest_jmpbuf) == 0); \
|
||||
__igt_fixture_end())
|
||||
|
||||
/* check functions which auto-skip tests by calling igt_skip() */
|
||||
void gem_require_caching(int fd);
|
||||
|
||||
Reference in New Issue
Block a user