[Intel-gfx] [PATCH i-g-t 11/12] testdisplay: Provide a full path when opening pngs

Damien Lespiau damien.lespiau at intel.com
Fri Sep 6 21:08:49 CEST 2013


This way one doesn't have to be in tests/ for testsdisplay to be able to
open pass.png.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 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




More information about the Intel-gfx mailing list