testdisplay: Provide a full path when opening pngs
authorDamien Lespiau <damien.lespiau@intel.com>
Fri, 6 Sep 2013 10:44:41 +0000 (11:44 +0100)
committerDamien Lespiau <damien.lespiau@intel.com>
Mon, 30 Sep 2013 17:04:22 +0000 (18:04 +0100)
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@intel.com>
tests/Makefile.am
tests/testdisplay.c

index c7209af..99d98d6 100644 (file)
@@ -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 = \
index 00d777a..df3b4d4 100644 (file)
@@ -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));
 }