cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=99018bcb5f972bc1c637a556edc8866920b15eff

commit 99018bcb5f972bc1c637a556edc8866920b15eff
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Wed Jul 6 15:52:05 2016 -0700

    elementary: use initialization information to initialize test application 
once.
---
 src/bin/elementary/test.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index b884129..9f6eb8d 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -1027,17 +1027,25 @@ efl_main(void *data EINA_UNUSED,
    Eina_Bool test_win_only = EINA_FALSE;
    char *autorun = NULL;
 
-   _log_domain = eina_log_domain_register("elementary_test", NULL);
+   if (arge->initialization)
+     {
+        _log_domain = eina_log_domain_register("elementary_test", NULL);
+
+        eo_event_callback_add(ev->object, EO_EVENT_DEL, _main_loop_death, 
NULL);
 
-   eo_event_callback_add(ev->object, EO_EVENT_DEL, _main_loop_death, NULL);
+        elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
 
-   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+        /* tell elm about our app so it can figure out where to get files */
+        elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
+        elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR);
+        elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
+        elm_app_info_set(efl_main, "elementary", "images/logo.png");
 
-   /* tell elm about our app so it can figure out where to get files */
-   elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
-   elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR);
-   elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
-   elm_app_info_set(efl_main, "elementary", "images/logo.png");
+        elm_color_class_translate_cb_set(colorclass_tl_cb);
+        elm_color_class_list_cb_set(colorclass_list_cb);
+
+        /* put here any init specific to this app like parsing args etc. */
+     }
 
    /* if called with a single argument try to autorun a test with
     * the same name as the given param
@@ -1069,9 +1077,6 @@ efl_main(void *data EINA_UNUSED,
           }
      }
 
-   elm_color_class_translate_cb_set(colorclass_tl_cb);
-   elm_color_class_list_cb_set(colorclass_list_cb);
-   /* put here any init specific to this app like parsing args etc. */
    my_win_main(autorun, test_win_only); /* create main window */
 
    /* FIXME: Hum, no exit code anywhere anymore ? */

-- 


Reply via email to