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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux