tests/elm_test_image: Give a proper path to test images
authorStefan Schmidt <s.schmidt@samsung.com>
Wed, 22 Apr 2015 15:08:59 +0000 (17:08 +0200)
committerStefan Schmidt <s.schmidt@samsung.com>
Wed, 22 Apr 2015 15:24:42 +0000 (17:24 +0200)
../../ does not always work. VPATH builds like distcheck have a different
dir layout.

ref T2028

legacy/elementary/src/tests/Makefile.am
legacy/elementary/src/tests/elm_test_image.c

index 185669c..551a255 100644 (file)
@@ -76,6 +76,7 @@ elm_suite_SOURCES = \
 
 elm_suite_CPPFLAGS = \
        -DTESTS_BUILD_DIR=\"${top_builddir}/src/tests\" \
+       -DELM_IMAGE_DATA_DIR=\"${top_srcdir}/data\" \
        -I$(top_srcdir)/src/lib \
        -I$(top_builddir)/src/lib \
        @CHECK_CFLAGS@ \
@@ -93,6 +94,7 @@ check_PROGRAMS += elm_cxx_suite
 elm_cxx_suite_SOURCES = elm_cxx_suite.cc
 elm_cxx_suite_CPPFLAGS = \
        -DTESTS_BUILD_DIR=\"${top_builddir}/src/tests\" \
+       -DELM_IMAGE_DATA_DIR=\"${top_srcdir}/data\" \
        -I$(top_srcdir)/src/lib \
        -I$(top_builddir)/src/lib \
        @CHECK_CFLAGS@ \
index 714689a..2d075f7 100644 (file)
@@ -6,7 +6,7 @@
 #include <Elementary.h>
 #include "elm_suite.h"
 
-static const char pathfmt[] = "../../data/images/icon_%02d.png";
+static const char pathfmt[] =  ELM_IMAGE_DATA_DIR"/images/icon_%02d.png";
 static const char invalid[] = "thereisnosuchimage.png";
 #define MAX_IMAGE_ID 23