@@ -139,6 +139,7 @@ stable_nop_on_ring(int fd, uint32_t handle, unsigned int engine,
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 @@ static void headless(int fd, uint32_t handle)
/* 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)
{
@@ -681,8 +683,10 @@ igt_main
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();
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> --- tests/gem_exec_nop.c | 4 ++++ 1 file changed, 4 insertions(+)