mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-22 13:52:54 +00:00
tests: roll out igt_fixture
Also sprinkle igt_assert and igt_require over the setup code to clean up code while at it. To avoid gcc getting upset about unitialized variables just move them out of main as global data (where they always get initialized to 0) - gcc can't see through our igt_fixture and igt_subtest maze properly. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
+6
-4
@@ -145,16 +145,17 @@ static void run_on_ring(int fd, unsigned ring_id, const char *ring_name)
|
||||
|
||||
}
|
||||
|
||||
int fd;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
igt_subtest_init(argc, argv);
|
||||
igt_skip_on_simulation();
|
||||
|
||||
fd = drm_open_any();
|
||||
igt_fixture {
|
||||
fd = drm_open_any();
|
||||
|
||||
if (!igt_only_list_subtests()) {
|
||||
/* This test is very sensitive to residual gtt_mm noise from previous
|
||||
* tests. Try to quiet thing down first. */
|
||||
gem_quiescent_gpu(fd);
|
||||
@@ -173,7 +174,8 @@ int main(int argc, char **argv)
|
||||
igt_subtest("vebox")
|
||||
run_on_ring(fd, LOCAL_I915_EXEC_VEBOX, "vebox");
|
||||
|
||||
close(fd);
|
||||
igt_fixture
|
||||
close(fd);
|
||||
|
||||
igt_exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user