tests/gem_exec_nop: Disable headless subtest on cairoless Android
Currently whole igt_kms.c is disabled while compiling on Android without
cairo, so this tests does not compile.
There should be cleaner a way to disable only cairo dependant parts
which should allow us to enable at least some of the KMS tests, but
that's a bigger rework for another time.
v2: simplified #ifs on CAIRO/ANDROID (P. Latvala)
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index 45ab47d..9f3c351 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -139,6 +139,7 @@
return n;
}
+#if !defined(ANDROID) || ANDROID_HAS_CAIRO
#define assert_within_epsilon(x, ref, tolerance) \
igt_assert_f((x) <= (1.0 + tolerance) * ref && \
(x) >= (1.0 - tolerance) * ref, \
@@ -183,6 +184,7 @@
/* check that the two execution speeds are roughly the same */
assert_within_epsilon(n_headless, n_display, 0.1f);
}
+#endif
static bool ignore_engine(int fd, unsigned engine)
{
@@ -665,8 +667,10 @@
igt_subtest("context-sequential")
sequential(device, handle, FORKED | CONTEXT, 150);
+#if !defined(ANDROID) || ANDROID_HAS_CAIRO
igt_subtest("headless")
headless(device, handle);
+#endif
igt_fixture {
igt_stop_hang_detector();