summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-14 16:51:26 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-14 16:52:08 +0200
commitf8c0dfe399d7b5351a16d111285e85f54a5725ff (patch)
treea4ad85507ec09473c74be7e8884bea8a4ce73349 /lib/drmtest.c
parenta1ca8ef5b1f44845bb2d0eada0123eb35b7e0b21 (diff)
lib/drmtest: sprinkle documentation over igt_skip|fail|success|exit
And make the behaviour of igt_exit() a bit saner. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index f024c587..3cfe3e6d 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -815,7 +815,10 @@ void __igt_fail_assert(int exitcode, const char *file,
void igt_exit(void)
{
if (igt_only_list_subtests())
- return;
+ exit(0);
+
+ if (!test_with_subtests)
+ exit(0);
/* Calling this without calling one of the above is a failure */
assert(skipped_one || succeeded_one || failed_one);
@@ -849,8 +852,15 @@ bool igt_run_in_simulation(void)
return simulation;
}
-/* Skip the test when running on simulation (and that's relevant only when
- * we're not in the mode where we list the subtests) */
+/**
+ * igt_skip_on_simulation - skip tests when INTEL_SIMULATION env war is set
+ *
+ * Skip the test when running on simulation (and that's relevant only when
+ * we're not in the mode where we list the subtests).
+ *
+ * This function is subtest aware (since it uses igt_skip) and so can be used to
+ * skip specific subtests or all subsequent subtests.
+ */
void igt_skip_on_simulation(void)
{
if (igt_only_list_subtests())