On Wed, Apr 19, 2017 at 01:01:55PM +0200, Arkadiusz Hiler wrote: > 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. > > Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx> > --- > lib/Android.mk | 1 + > tests/gem_exec_nop.c | 4 ++++ > 2 files changed, 5 insertions(+) > > diff --git a/lib/Android.mk b/lib/Android.mk > index 31f88be..dc538b8 100644 > --- a/lib/Android.mk > +++ b/lib/Android.mk > @@ -38,6 +38,7 @@ ifeq ("${ANDROID_HAS_CAIRO}", "1") > LOCAL_C_INCLUDES += $(ANDROID_BUILD_TOP)/external/cairo-1.12.16/src > LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=1 -DIGT_DATADIR=\".\" -DIGT_SRCDIR=\".\" > else > + > skip_lib_list := \ > igt_kms.c \ > igt_kms.h \ > diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c > index 66c2fc1..967caef 100644 > --- a/tests/gem_exec_nop.c > +++ b/tests/gem_exec_nop.c > @@ -138,6 +138,7 @@ stable_nop_on_ring(int fd, uint32_t handle, unsigned int engine, > return n; > } > > +#if (!defined(ANDROID)) || (defined(ANDROID) && ANDROID_HAS_CAIRO) Tautological check for ANDROID being defined. Is it too confusing to reduce this to #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, \ > @@ -178,6 +179,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) > { > @@ -561,8 +563,10 @@ igt_main > igt_subtest("context-sequential") > sequential(device, handle, FORKED | CONTEXT, 150); > > +#if (!defined(ANDROID)) || (defined(ANDROID) && ANDROID_HAS_CAIRO) Likewise. -- Petri Latvala > igt_subtest("headless") > headless(device, handle); > +#endif > > igt_fixture { > igt_stop_hang_detector(); > -- > 2.9.3 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx