summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2016-01-12 17:50:40 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2016-01-12 17:50:40 +0900
commitfc1b47d841e237d84673ad6883659f5be421ae57 (patch)
treeb0c5d45a3aae1bf4671af3bf7c029cfaa4e0f429
parent71d6e7761dfccc0b2bdcd2ae6f34b7a954e693b5 (diff)
downloadaul-1-fc1b47d841e237d84673ad6883659f5be421ae57.tar.gz
aul-1-fc1b47d841e237d84673ad6883659f5be421ae57.tar.bz2
aul-1-fc1b47d841e237d84673ad6883659f5be421ae57.zip
Move tool files to the tool folder
Change-Id: I429446d19f50a7b1b153af0750c55eeabf65ab8f Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r--CMakeLists.txt24
-rw-r--r--tool/CMakeLists.txt (renamed from test/CMakeLists.txt)18
-rw-r--r--tool/app_com_tool.c21
-rw-r--r--tool/app_launcher.c (renamed from app_launcher.c)0
-rw-r--r--tool/appid2pid.c (renamed from test/appid2pid.c)0
-rw-r--r--tool/aul_test.c (renamed from test/aul_test.c)0
-rw-r--r--tool/launch_app.c (renamed from test/launch_app.c)0
-rw-r--r--tool/launch_debug.c (renamed from test/launch_debug.c)0
-rw-r--r--tool/open_app.c (renamed from test/open_app.c)0
9 files changed, 28 insertions, 35 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03942b1f..3fde9e01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,26 +69,6 @@ SET_TARGET_PROPERTIES(aul PROPERTIES SOVERSION ${MAJORVER})
SET_TARGET_PROPERTIES(aul PROPERTIES VERSION ${FULLVER})
INSTALL(TARGETS aul DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
-# app_launcher
-SET(APP_LAUNCHER "app_launcher")
-ADD_EXECUTABLE(${APP_LAUNCHER} app_launcher.c)
-SET_TARGET_PROPERTIES(${APP_LAUNCHER} PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS} -fPIE")
-TARGET_LINK_LIBRARIES(${APP_LAUNCHER} aul ${APP_LAUNCHER_DEPS_LDFLAGS} "-pie")
-INSTALL(TARGETS app_launcher DESTINATION bin)
-
-# appgroup info tool
-SET(APPGROUP_INFO "appgroup_info")
-ADD_EXECUTABLE(${APPGROUP_INFO} tool/app_group_info.c)
-SET_TARGET_PROPERTIES(${APPGROUP_INFO} PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS} -fPIE")
-TARGET_LINK_LIBRARIES(${APPGROUP_INFO} aul ${APPGROUP_INFO_DEPS_LDFLAGS} "-pie")
-INSTALL(TARGETS appgroup_info DESTINATION bin)
-
-SET(APP_COM_TOOL "app_com_tool")
-ADD_EXECUTABLE(${APP_COM_TOOL} tool/app_com_tool.c)
-SET_TARGET_PROPERTIES(${APP_COM_TOOL} PROPERTIES COMPILE_FLAGS "${EXTRA_CFLAGS} -fPIE")
-TARGET_LINK_LIBRARIES(${APP_COM_TOOL} aul ${APP_COM_TOOL_DEPS_LDFLAGS} "-pie")
-INSTALL(TARGETS app_com_tool DESTINATION bin)
-
# pkgconfig file
CONFIGURE_FILE(aul.pc.in aul.pc @ONLY)
CONFIGURE_FILE(legacy/preload_list.txt.in legacy/preload_list.txt @ONLY)
@@ -107,5 +87,5 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/legacy/preload_list.txt DESTINATION ${
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/feature/preexec_list.txt DESTINATION ${SHARE_INSTALL_PREFIX}/aul )
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/miregex DESTINATION ${SHARE_INSTALL_PREFIX}/aul )
-# test
-add_subdirectory(test)
+# tool
+add_subdirectory(tool)
diff --git a/test/CMakeLists.txt b/tool/CMakeLists.txt
index 40e302ca..e2ddefbf 100644
--- a/test/CMakeLists.txt
+++ b/tool/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Test executables
-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TEST_CFLAGS} -fPIE")
add_executable(aul_test
@@ -12,6 +10,7 @@ add_executable(launch_app
target_link_libraries(launch_app aul ${pkgs_LDFLAGS} "-pie")
INSTALL(TARGETS launch_app DESTINATION bin)
+# test
add_executable(open_app
open_app.c)
target_link_libraries(open_app aul ${pkgs_LDFLAGS} "-pie")
@@ -26,3 +25,18 @@ add_executable(launch_debug
launch_debug.c)
target_link_libraries(launch_debug aul ${pkgs_LDFLAGS} "-pie")
INSTALL(TARGETS launch_debug DESTINATION bin)
+
+add_executable(app_launcher
+ app_launcher.c)
+target_link_libraries(app_launcher aul ${pkgs_LDFLAGS} "-pie")
+INSTALL(TARGETS app_launcher DESTINATION bin)
+
+add_executable(appgroup_info
+ app_group_info.c)
+target_link_libraries(appgroup_info aul ${pkgs_LDFLAGS} "-pie")
+INSTALL(TARGETS appgroup_info DESTINATION bin)
+
+add_executable(app_com_tool
+ app_com_tool.c)
+target_link_libraries(app_com_tool aul ${pkgs_LDFLAGS} "-pie")
+INSTALL(TARGETS app_com_tool DESTINATION bin)
diff --git a/tool/app_com_tool.c b/tool/app_com_tool.c
index 6803073a..11b3dee9 100644
--- a/tool/app_com_tool.c
+++ b/tool/app_com_tool.c
@@ -50,11 +50,13 @@ static void join(const char *endpoint, const char *filter)
static void send(const char *endpoint)
{
int idx = 2;
+ int ret;
+
bundle *b = bundle_create();
- for (idx = 2; idx < gargc; idx += 2) {
+ for (idx = 2; idx < gargc; idx += 2)
bundle_add_str(b, gargv[idx], gargv[idx + 1]);
- }
- int ret = aul_app_com_send(endpoint, b);
+
+ ret = aul_app_com_send(endpoint, b);
printf("ret: %d\n", ret);
g_main_loop_quit(mainloop);
@@ -69,25 +71,22 @@ static gboolean run_func(void *data)
}
if (g_strcmp0(gargv[1], "create") == 0) {
- if (gargc == 3) {
+ if (gargc == 3)
create(gargv[2], NULL);
- } else if (gargc == 4) {
+ else if (gargc == 4)
create(gargv[2], gargv[3]);
- }
}
if (g_strcmp0(gargv[1], "join") == 0) {
- if (gargc == 3) {
+ if (gargc == 3)
join(gargv[2], NULL);
- } else if (gargc == 4) {
+ else if (gargc == 4)
join(gargv[2], gargv[3]);
- }
}
if (g_strcmp0(gargv[1], "send") == 0) {
- if (gargc > 4) {
+ if (gargc > 4)
send(gargv[2]);
- }
}
return FALSE;
diff --git a/app_launcher.c b/tool/app_launcher.c
index 4032afc1..4032afc1 100644
--- a/app_launcher.c
+++ b/tool/app_launcher.c
diff --git a/test/appid2pid.c b/tool/appid2pid.c
index 97f205ea..97f205ea 100644
--- a/test/appid2pid.c
+++ b/tool/appid2pid.c
diff --git a/test/aul_test.c b/tool/aul_test.c
index 3010d089..3010d089 100644
--- a/test/aul_test.c
+++ b/tool/aul_test.c
diff --git a/test/launch_app.c b/tool/launch_app.c
index 8fe5a9a1..8fe5a9a1 100644
--- a/test/launch_app.c
+++ b/tool/launch_app.c
diff --git a/test/launch_debug.c b/tool/launch_debug.c
index f6b4174c..f6b4174c 100644
--- a/test/launch_debug.c
+++ b/tool/launch_debug.c
diff --git a/test/open_app.c b/tool/open_app.c
index cda801d8..cda801d8 100644
--- a/test/open_app.c
+++ b/tool/open_app.c