summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-23 16:13:15 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-01-23 16:14:00 +0100
commitc1c30cc6ce435021084f30567fa6ec9cd939e0b5 (patch)
treec76022bbcff2024ba25de31e6a5e35dabf55c9f9
parentd975597fb47be991eadf2f69bdb11a0b8964c807 (diff)
eolian tests: pass in generator path externally
-rw-r--r--src/Makefile_Eolian.am1
-rw-r--r--src/tests/eolian/eolian_generation.c15
2 files changed, 3 insertions, 13 deletions
diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am
index 92df3ed689..1a85c15118 100644
--- a/src/Makefile_Eolian.am
+++ b/src/Makefile_Eolian.am
@@ -119,6 +119,7 @@ tests_eolian_eolian_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl -I$(top_build
119-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eolian\" \ 119-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/eolian\" \
120-DPACKAGE_DATA_DIR=\"$(top_srcdir)/src/tests/eolian\" \ 120-DPACKAGE_DATA_DIR=\"$(top_srcdir)/src/tests/eolian\" \
121-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \ 121-DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)\" \
122-DEOLIAN_GEN="\"$(EOLIAN_GEN)\"" \
122@CHECK_CFLAGS@ \ 123@CHECK_CFLAGS@ \
123@EOLIAN_CFLAGS@ @EO_CFLAGS@ 124@EOLIAN_CFLAGS@ @EO_CFLAGS@
124TESTS += tests/eolian/eolian_suite 125TESTS += tests/eolian/eolian_suite
diff --git a/src/tests/eolian/eolian_generation.c b/src/tests/eolian/eolian_generation.c
index 0607269305..fe4e55121e 100644
--- a/src/tests/eolian/eolian_generation.c
+++ b/src/tests/eolian/eolian_generation.c
@@ -83,21 +83,10 @@ _remove_ref(const char *base, const char *ext)
83static int 83static int
84_eolian_gen_execute(const char *eo_filename, const char *options, const char *output_filename) 84_eolian_gen_execute(const char *eo_filename, const char *options, const char *output_filename)
85{ 85{
86 char eolian_gen_path[PATH_MAX] = "";
87 char command[PATH_MAX]; 86 char command[PATH_MAX];
88
89 if (getenv("EFL_RUN_IN_TREE"))
90 {
91 snprintf(eolian_gen_path, sizeof(eolian_gen_path),
92 "%s/src/bin/eolian/eolian_gen%s",
93 PACKAGE_BUILD_DIR, EXEEXT);
94 }
95 if (eolian_gen_path[0] == '\0')
96 return -1;
97
98 snprintf(command, PATH_MAX, 87 snprintf(command, PATH_MAX,
99 "%s %s -I \""PACKAGE_DATA_DIR"/data\" -o %s %s", 88 EOLIAN_GEN" %s -I \""PACKAGE_DATA_DIR"/data\" -o %s %s",
100 eolian_gen_path, options, output_filename, eo_filename); 89 options, output_filename, eo_filename);
101 return system(command); 90 return system(command);
102} 91}
103 92