elua: use a minimal app to avoid loading eolian at runtime
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Thu, 7 May 2015 10:56:59 +0000 (11:56 +0100)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Thu, 7 May 2015 10:56:59 +0000 (11:56 +0100)
Otherwise it would fail on systems with no Eolian installed.

@fix

src/Makefile_Elua.am
src/tests/elua/data/apps/test.lua [new file with mode: 0644]
src/tests/elua/elua_lib.c

index a053053..b889a45 100644 (file)
@@ -123,7 +123,7 @@ tests_elua_elua_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 -DELUA_BINDINGS_DIR=\"$(ELUA_BINDINGS_DIR)\" \
 -DELUA_CORE_DIR=\"$(ELUA_CORE_DIR)\" \
 -DELUA_MODULES_DIR=\"$(ELUA_MODULES_DIR)\" \
--DELUA_APPS_DIR=\"$(ELUA_APPS_DIR)\" \
+-DELUA_APPS_DIR=\"$(top_srcdir)/src/tests/elua/data/apps\" \
 @CHECK_CFLAGS@ \
 @ELUA_CFLAGS@
 
@@ -140,4 +140,6 @@ tests_elua_elua_suite_DEPENDENCIES = @USE_ELUA_INTERNAL_LIBS@
 
 endif
 
+EXTRA_DIST += tests/elua/data/apps/test.lua
+
 endif
diff --git a/src/tests/elua/data/apps/test.lua b/src/tests/elua/data/apps/test.lua
new file mode 100644 (file)
index 0000000..2e9bab1
--- /dev/null
@@ -0,0 +1,2 @@
+-- test elua app
+return true
index 8285727..bd959ca 100644 (file)
@@ -18,7 +18,7 @@ START_TEST(elua_api)
     int fd;
     char *cargv[2];
     char arg1[] = "test";
-    char arg2[] = "lualian";
+    char arg2[] = "test";
     int quit = 0;
     cargv[0] = arg1;
     cargv[1] = arg2;
@@ -69,7 +69,7 @@ START_TEST(elua_api)
     fail_if(!elua_util_require(st, "util"));
     fail_if(!elua_util_string_run(st, "return 1337", "foo"));
     fail_if(elua_util_string_run(st, "foo bar", "foo")); /* invalid code */
-    fail_if(elua_util_app_load(st, "lualian"));
+    fail_if(elua_util_app_load(st, "test"));
     fail_if(lua_type(lst, -1) != LUA_TFUNCTION);
     lua_pop(lst, 1);
     fail_if(!elua_util_app_load(st, "non_existent_app"));