forked from enlightenment/efl
Edje tests: Fix tests when running out of source and remove hack.
There was a seriously horrible hack here to workaround this issue. This
hacks goes all the way back to 3e07236
. The essence of the hack was to
try the system files for the tests (and I guess that's why we were
shipping them although we really shouldn't).
This change fixes the file lookup for out of source files.
Hat-tip to zmike for pointing me to abs_top_buildir.
This commit is contained in:
parent
68417186a9
commit
b337558fd6
|
@ -276,7 +276,7 @@ tests/edje/edje_suite.h
|
||||||
tests_edje_edje_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
tests_edje_edje_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
||||||
$(EDJE_COMMON_CPPFLAGS) \
|
$(EDJE_COMMON_CPPFLAGS) \
|
||||||
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/edje\" \
|
-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/edje\" \
|
||||||
-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/edje\" \
|
-DTESTS_BUILD_DIR=\"$(abs_top_builddir)/src/tests/edje\" \
|
||||||
@CHECK_CFLAGS@
|
@CHECK_CFLAGS@
|
||||||
tests_edje_edje_suite_LDADD = @CHECK_LIBS@ $(USE_EDJE_BIN_LIBS)
|
tests_edje_edje_suite_LDADD = @CHECK_LIBS@ $(USE_EDJE_BIN_LIBS)
|
||||||
tests_edje_edje_suite_DEPENDENCIES = @USE_EDJE_INTERNAL_LIBS@
|
tests_edje_edje_suite_DEPENDENCIES = @USE_EDJE_INTERNAL_LIBS@
|
||||||
|
|
|
@ -49,16 +49,6 @@ test_layout_get(const char *name)
|
||||||
|
|
||||||
snprintf(filename, PATH_MAX, TESTS_BUILD_DIR"/data/%s", name);
|
snprintf(filename, PATH_MAX, TESTS_BUILD_DIR"/data/%s", name);
|
||||||
|
|
||||||
static int is_local = -1;
|
|
||||||
if (is_local == -1)
|
|
||||||
{
|
|
||||||
struct stat st;
|
|
||||||
is_local = (stat(filename, &st) == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_local)
|
|
||||||
snprintf(filename, PATH_MAX, PACKAGE_DATA_DIR"/data/%s", name);
|
|
||||||
|
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue