diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-20 22:03:30 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-20 22:26:32 +0200 |
commit | 57e573ecc1c53b3aafe6ac4784069d79bd73107d (patch) | |
tree | 92a7769fe78bbfb754563a1624c4e34045bed0e5 /tests | |
parent | c158128de5541f67543ea7fcb2404bc06e5d8fa3 (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pc8.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/pc8.c b/tests/pc8.c index 06c54b70..16960ec0 100644 --- a/tests/pc8.c +++ b/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(); } |