[EGIT] [core/efl] master 01/01: efl-mono: Add test and fix problem with private dynamic types passed as parameters

2019-04-09 Thread Felipe Magno de Almeida
vitorsousa pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0afd19ba62f38567c12cb1bf953ffdd4d402f382

commit 0afd19ba62f38567c12cb1bf953ffdd4d402f382
Author: Felipe Magno de Almeida 
Date:   Tue Apr 9 18:37:01 2019 -0300

efl-mono: Add test and fix problem with private dynamic types passed as 
parameters

Summary:
The code that searches the type dynamically fails instead of falling
back to Efl.Object. Now it fallbacks to Efl.Object.

Fixes T7783

Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, 
YOhoho, lauromoura

Reviewed By: vitor.sousa, lauromoura

Subscribers: lauromoura, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7783

Differential Revision: https://phab.enlightenment.org/D8574
---
 src/bindings/mono/eo_mono/iwrapper.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bindings/mono/eo_mono/iwrapper.cs 
b/src/bindings/mono/eo_mono/iwrapper.cs
index 83d8fd53ca..5850da8c5c 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -824,7 +824,7 @@ public static class ClassRegister
 
 if (t == null)
 {
-throw new System.InvalidOperationException($"Could not find 
the C# binding class for the EFL class: {name}");
+return typeof(Efl.Object);
 }
 }
 

-- 




[EGIT] [core/efl] master 01/01: csharp: Add some null checks.

2019-04-09 Thread Lauro Moura
vitorsousa pushed a commit to branch master.

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

commit e7e1d777f1107940164246a9e3e5921ba37eb8cf
Author: Lauro Moura 
Date:   Tue Apr 9 16:23:03 2019 -0300

csharp: Add some null checks.

Summary:
- Check for nullness when getting stuff from C# to C
- We should return null when wrapping a NULL pointer instead of throwing
  an exception

Reviewers: felipealmeida, vitor.sousa, woohyun

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8580
---
 src/bin/eolian_mono/eolian/mono/struct_definition.hh | 4 ++--
 src/bindings/mono/eo_mono/iwrapper.cs| 6 ++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh 
b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index c059dd9cbe..d8f03118e7 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -48,7 +48,7 @@ struct to_internal_field_convert_generator
   if (klass)
 {
if (!as_generator(
- indent << scope_tab << scope_tab << "_internal_struct." << 
string << " = _external_struct." << string << ".NativeHandle;\n")
+ indent << scope_tab << scope_tab << "_internal_struct." << 
string << " = _external_struct." << string << "?.NativeHandle ?? 
System.IntPtr.Zero;\n")
.generate(sink, std::make_tuple(field_name, field_name), 
context))
  return false;
 }
@@ -112,7 +112,7 @@ struct to_internal_field_convert_generator
   else if (field.type.c_type == "Eina_Value *" || field.type.c_type == 
"const Eina_Value *")
 {
if (!as_generator(
- indent << scope_tab << scope_tab << "_internal_struct." << 
string << " = _external_struct." << string << ".NativeHandle;\n"
+ indent << scope_tab << scope_tab << "_internal_struct." << 
string << " = _external_struct." << string << "?.NativeHandle ?? 
System.IntPtr.Zero;\n"
).generate(sink, std::make_tuple(field_name, field_name), 
context))
  return false;
 }
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs 
b/src/bindings/mono/eo_mono/iwrapper.cs
index f3696606d2..83d8fd53ca 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -589,6 +589,12 @@ public class Globals
 /// The C# wrapper for this instance.
 public static Efl.Eo.IWrapper CreateWrapperFor(System.IntPtr handle, bool 
shouldIncRef=true)
 {
+
+if (handle == IntPtr.Zero)
+{
+return null;
+}
+
 IntPtr eoKlass = efl_class_get(handle);
 
 if (eoKlass == IntPtr.Zero)

-- 




[EGIT] [core/enlightenment] master 03/03: bz5 -> genlist item flip on press of an option button to see main view

2019-04-09 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=32f5bb93ce99f5423b8271708b0f35141d1da639

commit 32f5bb93ce99f5423b8271708b0f35141d1da639
Author: Carsten Haitzler (Rasterman) 
Date:   Tue Apr 9 17:34:15 2019 +0100

bz5 -> genlist item flip on press of an option button to see main view

it isn't obvious you should flip back once u press a button to pair or
unpair or connect etc. you you can see the pair requests etc. that are
displayed in normal mode, not flipped mode.
---
 src/modules/bluez5/e_mod_popup.c | 67 +---
 1 file changed, 55 insertions(+), 12 deletions(-)

diff --git a/src/modules/bluez5/e_mod_popup.c b/src/modules/bluez5/e_mod_popup.c
index e2b68f611..4b0bb266d 100644
--- a/src/modules/bluez5/e_mod_popup.c
+++ b/src/modules/bluez5/e_mod_popup.c
@@ -208,87 +208,116 @@ _cb_visible(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_UNUS
 }
 
 static void
-_cb_pairable(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_unflip(Obj *o, Evas_Object *obj)
+{
+   Evas_Object *gl = evas_object_data_get(obj, "genlist");
+   Elm_Object_Item *it;
+
+   for (it = elm_genlist_first_item_get(gl); it;
+it = elm_genlist_item_next_get(it))
+ {
+if (o == elm_object_item_data_get(it))
+  {
+ if (elm_genlist_item_flip_get(it))
+   elm_genlist_item_flip_set(it, EINA_FALSE);
+ break;
+  }
+ }
+}
+
+static void
+_cb_pairable(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Obj *o = data;
if (elm_check_state_get(obj)) bz_obj_pairable(o);
else bz_obj_unpairable(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_connect(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_cb_connect(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Obj *o = data;
bz_obj_connect(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_disconnect(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_cb_disconnect(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Obj *o = data;
bz_obj_disconnect(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_trust(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_cb_trust(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Obj *o = data;
bz_obj_trust(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_distrust(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_cb_distrust(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Obj *o = data;
bz_obj_distrust(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_pair(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_cb_pair(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Obj *o = data;
bz_obj_pair(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_unpair(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_cb_unpair(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Obj *o = data;
bz_obj_remove(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_unlock_start(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_cb_unlock_start(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Obj *o = data;
printf("unlock start %s\n", o->address);
ebluez5_device_prop_unlock_set(o->address, EINA_TRUE);
ebluez5_popup_device_change(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_unlock_stop(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
+_cb_unlock_stop(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
Obj *o = data;
printf("unlock stop %s\n", o->address);
ebluez5_device_prop_unlock_set(o->address, EINA_FALSE);
ebluez5_popup_device_change(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_force_connect_start(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_cb_force_connect_start(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
 {
Obj *o = data;
ebluez5_device_prop_force_connect_set(o->address, EINA_TRUE);
ebluez5_popup_adapter_change(o);
+   _unflip(o, obj);
 }
 
 static void
-_cb_force_connect_stop(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+_cb_force_connect_stop(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
 {
Obj *o = data;
ebluez5_device_prop_force_connect_set(o->address, EINA_FALSE);
ebluez5_popup_adapter_change(o);
+   _unflip(o, obj);
 }
 
 static void
@@ -485,7 +514,7 @@ _cb_dev_text_get(void *data, Evas_Object *obj EINA_UNUSED,
 }
 
 static Evas_Object *
-_cb_dev_content_get(void *data EINA_UNUSED, Evas_Object *obj,
+_cb_dev_content_get(void *data, Evas_Object *obj,
 const char *part)
 {
Obj *o = data;
@@ -540,12 +569,14 @@ _cb_dev_content_get(void *data EINA_UNUSED, 

[EGIT] [core/enlightenment] master 01/03: evrything - gadget popup on mouse up now and no custom name+class

2019-04-09 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=f6b3dc9a1833063fbf27ca2c68b973e5febcd704

commit f6b3dc9a1833063fbf27ca2c68b973e5febcd704
Author: Carsten Haitzler (Rasterman) 
Date:   Mon Apr 1 00:06:37 2019 +0100

evrything - gadget popup on mouse up now and no custom name+class

a custom name+class meant the comp styling didnt work right for the
evry window popped up from the gadget. this fixes it to at least work
right as opposed to be missing a comp style.
---
 src/modules/everything/evry_gadget.c | 44 
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/src/modules/everything/evry_gadget.c 
b/src/modules/everything/evry_gadget.c
index 101960f87..c20f4127c 100644
--- a/src/modules/everything/evry_gadget.c
+++ b/src/modules/everything/evry_gadget.c
@@ -14,7 +14,8 @@ struct _Instance
Gadget_Config   *cfg;
E_Config_Dialog *cfd;
 
-   int  mouse_down;
+   Eina_Boolmouse_down E_BITFIELD;
+   Evas_Coord   mouse_down_x, mouse_down_y;
 
double   hide_start;
int  hide_x, hide_y;
@@ -26,8 +27,8 @@ struct _Instance
Eina_Boolillume_mode;
 };
 
-/* static void _button_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void 
*event_info); */
 static void _button_cb_mouse_down(void *data, Evas *e, Evas_Object 
*obj, void *event_info);
+static void _button_cb_mouse_up(void *data, Evas *e, Evas_Object 
*obj, void *event_info);
 static Eina_Bool_cb_focus_out(void *data, int type EINA_UNUSED, void 
*event);
 static void _del_func(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info EINA_UNUSED);
 
@@ -103,11 +104,10 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
inst->gcc = gcc;
inst->o_button = o;
 
-   /* evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP,
-*   _button_cb_mouse_up, inst); */
-
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
   _button_cb_mouse_down, inst);
+   evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP,
+  _button_cb_mouse_up, inst);
 
if (_illume_running())
  {
@@ -429,13 +429,28 @@ static void
 _button_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info)
 {
Instance *inst;
-   Evas_Event_Mouse_Down *ev;
+   Evas_Event_Mouse_Down *ev = event_info;
 
inst = data;
-   /* if (!inst->mouse_down)
-*   return; */
+   inst->mouse_down = EINA_TRUE;
+   inst->mouse_down_x = ev->canvas.x;
+   inst->mouse_down_y = ev->canvas.y;
+}
+
+static void
+_button_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info)
+{
+   Instance *inst;
+   Evas_Event_Mouse_Up *ev = event_info;
+   Evas_Coord dx, dy;
 
-   inst->mouse_down = 0;
+   inst = data;
+   if (!inst->mouse_down) return;
+
+   inst->mouse_down = EINA_FALSE;
+   dx = ev->canvas.x - inst->mouse_down_x;
+   dy = ev->canvas.y - inst->mouse_down_y;
+   if (((dx * dx) + (dy * dy)) > (5 * 5)) return;
 
ev = event_info;
if (ev->button == 1)
@@ -473,7 +488,6 @@ _button_cb_mouse_down(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNU
 inst->win = win;
 win->data = inst;
 
-ecore_evas_name_class_set(e_win_ee_get(win->ewin), "E", 
"everything-window");
 
 if (inst->illume_mode)
   _gadget_window_show(inst);
@@ -511,16 +525,6 @@ _button_cb_mouse_down(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNU
  }
 }
 
-/* static void
- * _button_cb_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_info)
- * {
- *Instance *inst;
- *Evas_Event_Mouse_Down *ev;
- *
- *inst = data;
- *inst->mouse_down = 1;
- * } */
-
 int
 evry_gadget_init(void)
 {

-- 




[EGIT] [core/enlightenment] master 02/03: tiling - fix theme elements to be namespaced with e/

2019-04-09 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=d14b566aa872d447191274794d70d19792629455

commit d14b566aa872d447191274794d70d19792629455
Author: Carsten Haitzler (Rasterman) 
Date:   Mon Apr 1 01:02:57 2019 +0100

tiling - fix theme elements to be namespaced with e/
---
 src/modules/tiling/e_mod_tiling.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/tiling/e_mod_tiling.c 
b/src/modules/tiling/e_mod_tiling.c
index 7473665bc..a0e33f206 100644
--- a/src/modules/tiling/e_mod_tiling.c
+++ b/src/modules/tiling/e_mod_tiling.c
@@ -1054,7 +1054,7 @@ _tiling_split_type_changed_popup(void)
  {
 _G.split_popup.obj = o = edje_object_add(e_comp->evas);
 if (!e_theme_edje_object_set(o, "base/theme/modules/tiling",
- "modules/tiling/main"))
+ "e/modules/tiling/main"))
edje_object_file_set(o, _G.edj_path, "modules/tiling/main");
 evas_object_resize(o, TILING_POPUP_SIZE, TILING_POPUP_SIZE);
 
@@ -1680,7 +1680,7 @@ _client_drag_mouse_move(void *data, int event 
EINA_UNUSED, void *event_info)
 extra->drag.hint = edje_object_add(e_comp->evas);
 if (!e_theme_edje_object_set(extra->drag.hint,
  "base/theme/modules/tiling",
- "modules/tiling/indicator"))
+ "e/modules/tiling/indicator"))
   edje_object_file_set(extra->drag.hint, _G.edj_path, 
"modules/tiling/indicator");
 evas_object_layer_set(extra->drag.hint, E_LAYER_CLIENT_DRAG);
 evas_object_show(extra->drag.hint);
@@ -2171,7 +2171,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, 
const char *style)
 
o = edje_object_add(gc->evas);
if (!e_theme_edje_object_set(o, "base/theme/modules/tiling",
-"modules/tiling/main"))
+"e/modules/tiling/main"))
  edje_object_file_set(o, _G.edj_path, "modules/tiling/main");
evas_object_show(o);
 

-- 




[EGIT] [core/efl] master 01/01: efl-mono: Make override of methods only for methods that are defined by the user

2019-04-09 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

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

commit df3b28b0ab650beb5d0fede24b164d2cc9c40ba9
Author: Felipe Magno de Almeida 
Date:   Tue Apr 9 11:16:17 2019 -0300

efl-mono: Make override of methods only for methods that are defined by the 
user

Summary:
Instead of overriding every method and making the callback to C, we
just override the methods that are found by reflection on the type.

Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, 
YOhoho, lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8579
---
 .../eolian/mono/function_registration.hh   |  7 +--
 src/bin/eolian_mono/eolian/mono/klass.hh   |  1 +
 src/bindings/mono/eo_mono/iwrapper.cs  | 23 ++
 3 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh 
b/src/bin/eolian_mono/eolian/mono/function_registration.hh
index 5898af9c27..fc044e6b72 100644
--- a/src/bin/eolian_mono/eolian/mono/function_registration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh
@@ -44,7 +44,10 @@ struct function_registration_generator
   return false;
 
 if(!as_generator
-   (scope_tab << scope_tab << "descs.Add(new Efl_Op_Description() {"
+   (scope_tab << scope_tab
+<< "if (methods.FirstOrDefault(m => m.Name == \"" << string << "\") != 
null)\n"
+<< scope_tab << scope_tab << scope_tab
+<< "descs.Add(new Efl_Op_Description() {"
 #ifdef _WIN32
 << "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")"
 #else
@@ -52,7 +55,7 @@ struct function_registration_generator
 #endif
 << ", func = Marshal.GetFunctionPointerForDelegate(" << string << 
"_static_delegate)});\n"
)
-   .generate(sink, std::make_tuple(f.c_name, f.c_name), context))
+   .generate(sink, std::make_tuple(name_helpers::managed_method_name(f), 
f.c_name, f.c_name), context))
   return false;
 return true;
   }
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh 
b/src/bin/eolian_mono/eolian/mono/klass.hh
index e34a126321..87ad1bd5a7 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -369,6 +369,7 @@ struct klass
  << scope_tab << "public override 
System.Collections.Generic.List GetEoOps(System.Type 
type)\n"
  << scope_tab << "{\n"
  << scope_tab << scope_tab << "var descs = new 
System.Collections.Generic.List();\n"
+ << scope_tab << scope_tab << "var methods = 
Efl.Eo.Globals.GetUserMethods(type);\n"
 )
 .generate(sink, attributes::unused, inative_cxt))
return false;
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs 
b/src/bindings/mono/eo_mono/iwrapper.cs
index 1aab776f26..f3696606d2 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -302,6 +302,29 @@ public class Globals
 return null;
 }
 
+public static System.Collections.Generic.List
+GetUserMethods(System.Type type)
+{
+var r = new 
System.Collections.Generic.List();
+r.AddRange(type.GetMethods());
+var base_type = type.BaseType;
+
+for (;base_type != null; base_type = base_type.BaseType)
+{
+var attrs = System.Attribute.GetCustomAttributes(type);
+foreach (var attr in attrs)
+{
+if (attr is Efl.Eo.NativeClass)
+{
+return r;
+}
+}
+
+r.AddRange(base_type.GetMethods());
+}
+return r;
+}
+
 public static byte class_initializer_call(IntPtr klass, System.Type type)
 {
 Eina.Log.Debug($"called with 0x{klass.ToInt64():x} {type}");

-- 




[EGIT] [core/efl] master 01/01: efl-mono: Fix --enable-mono-beta for tests

2019-04-09 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

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

commit b1f0031b55b356f9722ee643844fd055653c9678
Author: Felipe Magno de Almeida 
Date:   Tue Apr 9 11:07:50 2019 -0300

efl-mono: Fix --enable-mono-beta for tests

Reviewers: bu5hm4n, vitor.sousa, segfaultxavi, woohyun, Jaehyun_Cho, 
YOhoho, lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8573
---
 src/Makefile_Efl_Mono.am | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/Makefile_Efl_Mono.am b/src/Makefile_Efl_Mono.am
index d8c9dc55ab..43f2a1c6e2 100644
--- a/src/Makefile_Efl_Mono.am
+++ b/src/Makefile_Efl_Mono.am
@@ -495,9 +495,15 @@ tests_efl_mono_efl_mono_SOURCES = \
  tests/efl_mono/EinaTestData.cs \
  tests/efl_mono/StructHelpers.cs
 
+beta_mono_flags =
+
+if HAVE_CSHARP_BETA
+beta_mono_flags += -define:EFL_BETA
+endif
+
 tests/efl_mono/efl_mono$(EXEEXT): $(tests_efl_mono_efl_mono_SOURCES) 
tests/efl_mono/$(am__dirstamp) lib/efl_mono/libefl_mono.dll 
tests/efl_mono/libefl_mono_test.dll tests/efl_mono/efl_mono$(EXEEXT).config
@rm -f $@
-   $(AM_V_MCS) $(MCS) $(MCSFLAGS) 
-r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll 
-r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter 
%.cs, $(^))
+   $(AM_V_MCS) $(MCS) $(MCSFLAGS) 
-r:$(abs_top_builddir)/src/lib/efl_mono/libefl_mono.dll 
-r:$(abs_top_builddir)/src/tests/efl_mono/libefl_mono_test.dll -out:$@ $(filter 
%.cs, $(^)) $(beta_mono_flags)
 
 # Rule for generating the .cs files
 tests/efl_mono/%.eo.cs: tests/efl_mono/%.eo $(_EOLIAN_MONO_DEP)

-- 




[EGIT] [core/efl] master 01/01: unit tests: fix warnings when fork() is not available, fix evil's unit tests compilation

2019-04-09 Thread Vincent Torri
zmike pushed a commit to branch master.

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

commit cbea302b8f007daf5cb555e8ea6aa612d8a830c5
Author: Vincent Torri 
Date:   Tue Apr 9 10:05:18 2019 -0400

unit tests: fix warnings when fork() is not available, fix evil's unit 
tests compilation

Summary:
* some variables were defined, only when fork() was available
* since Eina.h is included unconditionally, add Eina path in 
Makefile_Evil.am

Test Plan: compilation

Reviewers: zmike, cedric, raster, devilhorns

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D8586
---
 src/Makefile_Evil.am  |  1 +
 src/tests/efl_check.h | 40 
 2 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/src/Makefile_Evil.am b/src/Makefile_Evil.am
index 7fbe99c79d..c18e0eab4b 100644
--- a/src/Makefile_Evil.am
+++ b/src/Makefile_Evil.am
@@ -91,6 +91,7 @@ tests/evil/evil_test_unistd.c
 
 tests_evil_evil_suite_CPPFLAGS = \
 -I$(top_builddir)/src/lib/efl \
+-I$(top_builddir)/src/lib/eina \
 -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/evil\" \
 -DPACKAGE_BUILD_DIR=\"$(abs_top_builddir)/\" \
 -DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/evil\" \
diff --git a/src/tests/efl_check.h b/src/tests/efl_check.h
index f7a62d96cf..aa2627cbd8 100644
--- a/src/tests/efl_check.h
+++ b/src/tests/efl_check.h
@@ -75,7 +75,9 @@ struct _Efl_Test_Case
void (*build)(TCase *tc);
 };
 
+#ifdef HAVE_FORK
 static int timeout_pid = 0;
+#endif
 
 EINA_UNUSED static void
 _efl_test_expect_error(const Eina_Log_Domain *d EINA_UNUSED, Eina_Log_Level 
level, const char *file EINA_UNUSED, const char *fnc, int line EINA_UNUSED, 
const char *fmt EINA_UNUSED, void *data, va_list args EINA_UNUSED)
@@ -153,6 +155,7 @@ _efl_test_use(int argc, const char **argv, const char 
*test_case)
return 0;
 }
 
+#ifdef HAVE_FORK
 static int
 _efl_test_fork_has(SRunner *sr)
 {
@@ -174,6 +177,7 @@ _efl_test_fork_has(SRunner *sr)
/* should never get there */
return 0;
 }
+#endif
 
 #ifdef ENABLE_TIMING_INFO
 EINA_UNUSED static double _timing_start_time;
@@ -308,29 +312,47 @@ _efl_suite_build_and_run(int argc, const char **argv, 
const char *suite_name, co
SRunner *sr;
TCase *tc;
int i, failed_count = 0;
+#ifdef HAVE_FORK
int do_fork;
int num_forks = 0;
int can_fork = 0;
-#ifdef HAVE_FORK
Eina_Bool timeout_reached = EINA_FALSE;
+# ifdef ENABLE_TIMING_INFO
+   double tcstart = 0.0;
+# endif
 #endif
 #ifdef ENABLE_TIMING_INFO
-   double tstart = 0.0, tcstart = 0.0;
-   int timing = _timing_enabled();
+   double tstart = 0.0;
+   int timing;
+#endif
 
+#ifdef ENABLE_TIMING_INFO
+   timing = _timing_enabled();
if (timing)
- tcstart = tstart = _timing_time_get();
+ tstart = _timing_time_get();
+#endif
+
+#ifdef HAVE_FORK
+# ifdef ENABLE_TIMING_INFO
+   if (timing)
+ tcstart = tstart;
+# endif
 #endif
+
fflush(stdout);
s = suite_create(suite_name);
sr = srunner_create(s);
+#ifdef HAVE_FORK
do_fork = _efl_test_fork_has(sr);
if (do_fork)
  can_fork = !!etc[1].test_case /* can't parallelize 1 test */;
+#endif
 
for (i = 0; etc[i].test_case; ++i)
  {
+#ifdef HAVE_FORK
 int pid = 0;
+#endif
 
 if (!_efl_test_use(argc, argv, etc[i].test_case))
continue;
@@ -352,10 +374,10 @@ _efl_suite_build_and_run(int argc, const char **argv, 
const char *suite_name, co
   if (!fork_map) fork_map = eina_hash_int32_new(NULL);
   eina_hash_add(fork_map, , etc[i].test_case);
   num_forks++;
-#ifdef ENABLE_TIMING_INFO
+# ifdef ENABLE_TIMING_INFO
   if (timing)
 tcstart = _timing_time_get();
-#endif
+# endif
   continue;
}
   }
@@ -365,8 +387,10 @@ _efl_suite_build_and_run(int argc, const char **argv, 
const char *suite_name, co
 if (init || shutdown)
   tcase_add_checked_fixture(tc, init, shutdown);
 
+#ifdef HAVE_FORK
 if (do_fork)
   tcase_set_timeout(tc, 0);
+#endif
 
 etc[i].build(tc);
 suite_add_tcase(s, tc);
@@ -376,10 +400,10 @@ _efl_suite_build_and_run(int argc, const char **argv, 
const char *suite_name, co
  failed_count = _efl_suite_run_end(sr, etc[i].test_case);
  if (failed_count > 255)
failed_count = 255;
-#ifdef ENABLE_TIMING_INFO
+# ifdef ENABLE_TIMING_INFO
  if (timing)
printf("TC TIME %s: %.5g\n", etc[i].test_case, 
_timing_time_get() - tcstart);
-#endif
+# endif
  exit(failed_count);
   }
 #endif

-- 




[EGIT] [core/efl] master 01/01: eldbus unit test: fix warnings

2019-04-09 Thread Vincent Torri
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=246ab7b2542a513aab6a9c54ce49df50c2905e21

commit 246ab7b2542a513aab6a9c54ce49df50c2905e21
Author: Vincent Torri 
Date:   Tue Apr 9 12:34:19 2019 +0100

eldbus unit test: fix warnings

Summary: include libgen.h so that basename() is declared

Test Plan: compilation

Reviewers: cedric, raster, zmike, devilhorns

Subscribers: #reviewers, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D8583
---
 src/tests/eldbus/eldbus_test_eldbus_model_method.c| 1 +
 src/tests/eldbus/eldbus_test_eldbus_model_signal.c| 1 +
 src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_method.c 
b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
index 1ac32f108e..24f9fbacca 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_method.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
@@ -3,6 +3,7 @@
 #endif
 
 #include 
+#include  /* basename() */
 
 #include 
 #include 
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c 
b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
index 7651e02687..d5dc19b62c 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
@@ -3,6 +3,7 @@
 #endif
 
 #include 
+#include  /* basename() */
 
 #include 
 #include 
diff --git a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c 
b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
index 69cf8bafc9..3be2294529 100644
--- a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
+++ b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
@@ -3,6 +3,7 @@
 #endif
 
 #include 
+#include  /* basename() */
 
 #include 
 #include 

--