stefan pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=1ff7158dab3122d9908fc5090fff0a8aa82ea898

commit 1ff7158dab3122d9908fc5090fff0a8aa82ea898
Author: Stefan Schmidt <s.schm...@samsung.com>
Date:   Wed Apr 22 17:08:59 2015 +0200

    tests/elm_test_image: Give a proper path to test images
    
    ../../ does not always work. VPATH builds like distcheck have a different
    dir layout.
    
    ref T2028
---
 src/tests/Makefile.am      | 2 ++
 src/tests/elm_test_image.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 185669c..551a255 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -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@ \
diff --git a/src/tests/elm_test_image.c b/src/tests/elm_test_image.c
index 714689a..2d075f7 100644
--- a/src/tests/elm_test_image.c
+++ b/src/tests/elm_test_image.c
@@ -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
 

-- 


Reply via email to