lib: allow igt_skip_on_simulation outside of fixtures.
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 22 Mar 2014 12:22:11 +0000 (13:22 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 22 Mar 2014 13:28:03 +0000 (14:28 +0100)
commita388f3b98f039403a4583748db980d4a44dd6748
treeacab5f9846c034c0b382e7a625c56097442f232c
parentc196c14319b8aae6369a9ce0ba349416847105a7
lib: allow igt_skip_on_simulation outside of fixtures.

Thomas noticed that in simulation mode a lot of the tests fall over
instead of skipping properly. This is due to recently added
self-checks which ensure that any call to igt_skip happens either
within a fixture or subtest block (or it's a simple test without
subtests). This is to catch bugs since pretty much always not wrapping
up hardware setup and checks into these blocks is a bug.

Bug simulation skipping is a bit different, so allow that exception.
Otherwise we'd need to fix up piles of tests (and likely need to play
a game of whack-a-mole).

Also add a library testcase for all the different variants to make
sure it really works.

Cc: Thomas Wood <thomas.wood@intel.com>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
lib/igt_core.c
tests/.gitignore
tests/Makefile.sources
tests/igt_simulation.c [new file with mode: 0644]