From 951b37e2d0d69ef7c013bf3ee7a57f7d6bd15119 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Fri, 6 Sep 2013 11:44:41 +0100 Subject: [PATCH] testdisplay: Provide a full path when opening pngs 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 c7209af..99d98d6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -194,7 +194,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)); } -- 2.7.4