From: Damien Lespiau Subject: [PATCH i-g-t 11/12] testdisplay: Provide a full path when opening pngs Date: Fri, 6 Sep 2013 20:08:49 +0100 Message-ID: <1378494530-3600-12-git-send-email-damien.lespiau@intel.com> References: <1378494530-3600-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id AF9B0E764C for ; Fri, 6 Sep 2013 12:09:37 -0700 (PDT) In-Reply-To: <1378494530-3600-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org This way one doesn't have to be in tests/ for testsdisplay to be able to open pass.png. Signed-off-by: Damien Lespiau --- tests/Makefile.am | 5 ++++- tests/testdisplay.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index dd63bda..2d10f72 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -187,7 +187,10 @@ CLEANFILES = $(EXTRA_PROGRAMS) AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ -I$(srcdir)/.. \ - -I$(srcdir)/../lib + -I$(srcdir)/../lib \ + -DIGT_DATADIR=\""$(abs_srcdir)"\" \ + $(NULL) + LDADD = ../lib/libintel_tools.la $(PCIACCESS_LIBS) $(DRM_LIBS) testdisplay_SOURCES = \ diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 00d777a..df3b4d4 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -319,7 +319,7 @@ static void paint_output_info(struct connector *c, struct kmstest_fb *fb) } if (qr_code) - paint_image(cr, "./pass.png"); + paint_image(cr, IGT_DATADIR"/pass.png"); igt_assert(!cairo_status(cr)); } -- 1.8.3.1