#include "elm_suite.h"
#include "../efl_check.h"
+static int main_pid = -1;
+static Eina_Bool did_shutdown;
+
static const Efl_Test_Case etc[] = {
{ "elm_config", elm_test_config },
{ "elm_check", elm_test_check },
ck_assert_int_eq(elm_init(1, args), 1);
}
+SUITE_INIT(elm2)
+{
+ char *args[] = { "exe" };
+
+ if (getpid() != main_pid)
+ {
+ ecore_fork_reset();
+ return;
+ }
+ if (!did_shutdown)
+ {
+ /* if running un-forked then remove cached init */
+ ck_assert_int_eq(elm_shutdown(), 0);
+ did_shutdown = 1;
+ }
+ ck_assert_int_eq(elm_init(1, args), 1);
+}
+
SUITE_SHUTDOWN(elm)
{
ck_assert_int_eq(elm_shutdown(), 0);
if (eina_streq(getenv("ELM_ENGINE"), "buffer"))
putenv("TESTS_GL_DISABLED=1");
+ main_pid = getpid();
+
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Elementary_Init", etc_init, SUITE_INIT_FN(elm), SUITE_SHUTDOWN_FN(elm));
- if (!failed_count)
- {
- failed_count += _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
- "Elementary", etc, SUITE_INIT_FN(elm), SUITE_SHUTDOWN_FN(elm));
- }
+ failed_count += !elm_init(1, (char*[]){"exe"});
+ EINA_SAFETY_ON_TRUE_RETURN_VAL(failed_count, 255);
+ /* preload default theme */
+ failed_count += !elm_theme_group_path_find(NULL, "elm/button/base/default");
+ EINA_SAFETY_ON_TRUE_RETURN_VAL(failed_count, 255);
+ failed_count += !elm_theme_group_path_find(NULL, "elm/win/base/default");
+ EINA_SAFETY_ON_TRUE_RETURN_VAL(failed_count, 255);
+
+ /* none of these will be found in the default theme,
+ * but all are "fetched" hundreds of times
+ * T6865
+ */
+ elm_theme_group_path_find(NULL, "elm/cursor/top_side/default");
+ elm_theme_group_path_find(NULL, "elm/cursor/bottom_side/default");
+ elm_theme_group_path_find(NULL, "elm/cursor/top_left_corner/default");
+ elm_theme_group_path_find(NULL, "elm/cursor/bottom_left_corner/default");
+ elm_theme_group_path_find(NULL, "elm/cursor/top_right_corner/default");
+ elm_theme_group_path_find(NULL, "elm/cursor/bottom_right_corner/default");
+
+
+ elm_theme_group_path_find(NULL, "elm/colorselector/item/color/default");
+
+ failed_count += _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
+ "Elementary", etc, SUITE_INIT_FN(elm2), SUITE_SHUTDOWN_FN(elm));
return (failed_count == 0) ? 0 : 255;
}