mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 17:36:11 +00:00
tests/pc8: Update to latest igt infrastructure
- Use igt_require for magic SKIP results while still printing results for all subtests. - Wrap setup/teardown code outside of subtests with igt_fixture. This will ensure that the so wrapped code isn't run when an igt_require/igt_assert failed (and we're essentially just printing the SKIP/FAIL result for all subtests) or when just enumerating subtests. - Use igt_exit. Otherwise SKIP/FAIL results of subtests won't be propagated correctly. - igt_subtest checks should be run unconditionally to make sure we always enumerate the same set of subtests. A bit on the line here since this is a subtest hidden behind a runtime flag. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
c158128de5
commit
57e573ecc1
18
tests/pc8.c
18
tests/pc8.c
@ -781,9 +781,8 @@ int main(int argc, char *argv[])
|
||||
/* Skip instead of failing in case the machine is not prepared to reach
|
||||
* PC8+. We don't want bug reports from cases where the machine is just
|
||||
* not properly configured. */
|
||||
printf("Checking if the environment is properly configured.\n");
|
||||
if (!setup_environment())
|
||||
return 77;
|
||||
igt_fixture
|
||||
igt_require(setup_environment());
|
||||
|
||||
igt_subtest("drm-resources-equal")
|
||||
drm_resources_equal_subtest();
|
||||
@ -793,12 +792,13 @@ int main(int argc, char *argv[])
|
||||
i2c_subtest();
|
||||
igt_subtest("stress-test")
|
||||
stress_test();
|
||||
if (do_register_compare)
|
||||
igt_subtest("register-compare")
|
||||
register_compare_subtest();
|
||||
igt_subtest("register-compare") {
|
||||
igt_require(do_register_compare);
|
||||
register_compare_subtest();
|
||||
}
|
||||
|
||||
teardown_environment();
|
||||
igt_fixture
|
||||
teardown_environment();
|
||||
|
||||
printf("Done!\n");
|
||||
return 0;
|
||||
igt_exit();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user