From patchwork Wed Apr 19 11:01:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Hiler X-Patchwork-Id: 9687293 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C6FD7602DC for ; Wed, 19 Apr 2017 11:02:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B83A4283F4 for ; Wed, 19 Apr 2017 11:02:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD2A2283FE; Wed, 19 Apr 2017 11:02:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7089D283F4 for ; Wed, 19 Apr 2017 11:02:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0AF5F6E2D7; Wed, 19 Apr 2017 11:02:46 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 048A86E2D7 for ; Wed, 19 Apr 2017 11:02:44 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2017 04:02:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,221,1488873600"; d="scan'208";a="89670342" Received: from ahiler-desk.igk.intel.com ([172.28.171.131]) by orsmga005.jf.intel.com with ESMTP; 19 Apr 2017 04:02:43 -0700 From: Arkadiusz Hiler To: intel-gfx@lists.freedesktop.org Date: Wed, 19 Apr 2017 13:01:55 +0200 Message-Id: <20170419110155.6828-14-arkadiusz.hiler@intel.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170419110155.6828-1-arkadiusz.hiler@intel.com> References: <20170419110155.6828-1-arkadiusz.hiler@intel.com> Organization: Intel Technology Poland sp. z o.o. - KRS 101882 - ul. Slowackiego 173, 80-298 Gdansk Subject: [Intel-gfx] [PATCH i-g-t 13/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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) #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) igt_subtest("headless") headless(device, handle); +#endif igt_fixture { igt_stop_hang_detector();