summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2020-04-19 01:53:50 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2020-04-19 01:53:50 +0200
commit1afb26428899cf24da45b73540f711ee27679fdb (patch)
treed29de57305d04acc3b28982b28750fdad31e43b6
parent7791d9fac6852c3ad5316f9d8da38b8b744354e3 (diff)
eolian: globally enable eolian_state_check, except for beta classes
Beta classes won't have their namespaces validated at this point. It is possible to set EOLIAN_CHECK_NAMESPACES_BETA=1 to enable checking those as well, if you want to fix them all.
-rw-r--r--src/lib/eolian/database_check.c5
-rw-r--r--src/tests/eolian/eolian_static.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/eolian/database_check.c b/src/lib/eolian/database_check.c
index 57cc6c6abc..02a8de84db 100644
--- a/src/lib/eolian/database_check.c
+++ b/src/lib/eolian/database_check.c
@@ -268,6 +268,9 @@ _check_namespaces(const Eolian_Unit *src)
268 Eina_Bool ret = EINA_TRUE; 268 Eina_Bool ret = EINA_TRUE;
269 Eina_Iterator *itr = eina_hash_iterator_data_new(src->objects); 269 Eina_Iterator *itr = eina_hash_iterator_data_new(src->objects);
270 const Eolian_Object *obj; 270 const Eolian_Object *obj;
271
272 Eina_Bool check_beta = !!getenv("EOLIAN_CHECK_NAMESPACES_BETA");
273
271 EINA_ITERATOR_FOREACH(itr, obj) 274 EINA_ITERATOR_FOREACH(itr, obj)
272 { 275 {
273 char const *dot = strrchr(obj->name, '.'); 276 char const *dot = strrchr(obj->name, '.');
@@ -277,7 +280,7 @@ _check_namespaces(const Eolian_Unit *src)
277 dot - obj->name); 280 dot - obj->name);
278 const Eolian_Object *cobj = eina_hash_find(src->objects, ssr); 281 const Eolian_Object *cobj = eina_hash_find(src->objects, ssr);
279 eina_stringshare_del(ssr); 282 eina_stringshare_del(ssr);
280 if (cobj) 283 if (cobj && (check_beta || !eolian_object_is_beta(cobj)))
281 { 284 {
282 eolian_state_log_obj(src->state, obj, 285 eolian_state_log_obj(src->state, obj,
283 "the namespace of object '%s' conflicts with %s:%d:%d", 286 "the namespace of object '%s' conflicts with %s:%d:%d",
diff --git a/src/tests/eolian/eolian_static.c b/src/tests/eolian/eolian_static.c
index fc156beb56..18c8d13742 100644
--- a/src/tests/eolian/eolian_static.c
+++ b/src/tests/eolian/eolian_static.c
@@ -12,10 +12,8 @@ EFL_START_TEST(eolian_static_check)
12 fail_if(!eolian_state_directory_add(eos, EO_SRC_DIR)); 12 fail_if(!eolian_state_directory_add(eos, EO_SRC_DIR));
13 fail_if(!eolian_state_all_eot_files_parse(eos)); 13 fail_if(!eolian_state_all_eot_files_parse(eos));
14 fail_if(!eolian_state_all_eo_files_parse(eos)); 14 fail_if(!eolian_state_all_eo_files_parse(eos));
15#if 0
16 /* too many failures to enable this yet */ 15 /* too many failures to enable this yet */
17 fail_if(!eolian_state_check(eos)); 16 fail_if(!eolian_state_check(eos));
18#endif
19 eolian_state_free(eos); 17 eolian_state_free(eos);
20} 18}
21EFL_END_TEST 19EFL_END_TEST