mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-11 16:32:58 +00:00
tests: Introduce igt_fixture
Just a tiny wrapper to protect global test setup/teardown code when just listing subtests. Rolling this out over all tests with subtests should allow us to generate the testlist with piglit as an unpriviledged user on a non-intel system. The aim here is to make our QA team happy who currently suffers from this. Even more so for the prime tests since you need a system with intel _and_ nouveau gpus to just be able to list tests. Exemplary conversion with gem_concurrent_blt.c Fixture is the same name other test suites like googletest use for setup/teardown code used by multiple tests. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -174,6 +174,8 @@ void igt_exit(void) __attribute__((noreturn));
|
||||
*/
|
||||
#define igt_require(expr) do { if (!(expr)) __igt_skip_check(__FILE__, __LINE__, __func__, #expr ); } while (0)
|
||||
|
||||
#define igt_fixture if (!igt_only_list_subtests())
|
||||
|
||||
/* check functions which auto-skip tests by calling igt_skip() */
|
||||
void gem_require_caching(int fd);
|
||||
static inline void gem_require_ring(int fd, int ring_id)
|
||||
|
||||
Reference in New Issue
Block a user