lib/drmtest: add igt_skip_on macro

I've fumbled the logic inversion when converting to igt_require way
too often, so lets add something for dummies like me ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2013-09-04 13:19:42 +02:00
parent 1f9d201be4
commit 5113df7891

View File

@ -186,7 +186,8 @@ void igt_exit(void) __attribute__((noreturn));
* This is useful to streamline the skip logic since it allows for a more flat
* code control flow.
*/
#define igt_require(expr) do { if (!(expr)) __igt_skip_check(__FILE__, __LINE__, __func__, #expr ); } while (0)
#define igt_require(expr) igt_skip_on(!(expr))
#define igt_skip_on(expr) do { if ((expr)) __igt_skip_check(__FILE__, __LINE__, __func__, #expr ); } while (0)
bool __igt_fixture(void);
void __igt_fixture_complete(void);