Commit Graph

12 Commits

Author SHA1 Message Date
Carsten Haitzler a57c7f7510 Revert command line array object because it's broken by design
Revert "ecore: get rid of commands in efl_task."
  This reverts commit 616381e9cf.
Revert "ecore: here comes a command line object"
  This reverts commit 48e5684b3c.

1. this is broken:

EOLIAN static const char*
_efl_core_command_line_command_get(const Eo *obj EINA_UNUSED, Efl_Core_Command_Line_Data *pd)
{
   return eina_strdup(pd->string_command);
}

it returns a const char * BUT it duplicates it on return. no. a big
fat honking NO. return a char * or don't duplicate. pick.

2. _efl_core_command_line_command_array_set() is broken by design. it
accepts an array of strings, but the strings are owned by the caller
who creates the array (requiring they free them up themselves after
this call) but the array becomes owned by the callee. the code here frees the
incoming array but doesn't care about the string content of it. it's
leak heaven waiting to happen (or bugs when someone wants to access
the array they create to walk it to free the strings they put into it
after it is set).

i brought this up and it was dismissed. now exactly he issue i brought
up is there with mixed ownership and the added complexity as well as
transfer of some ownership but not others.

go back and think about this so it isn't broken by design.
2019-02-12 19:54:35 +00:00
Marcel Hollerbach 48e5684b3c ecore: here comes a command line object
the mixin for now can carry a command, which can be setted as an string.
The string is then parsed again, this is done in order to make sure that
everything that needs escaping really is escaped or parsed correctly.

Differential Revision: https://phab.enlightenment.org/D7516
2019-02-12 11:19:28 +01:00
Marcel Hollerbach 2373d5db5b ecore: here comes a env object
the env object can be used to alter and edit the content of environment
variables. Additionally, the class efl.core.env can be used to to setup
a not applied set of environment variables, which then can be applied
later (in the future) to set it directly to a spawned process for
example, or as a general key/data storage. A efl.core.env object can
also be forked off, which makes it easy to customize predefined objects.

ref T7514

Differential Revision: https://phab.enlightenment.org/D7510
2019-02-12 11:19:28 +01:00
Mike Blumenkrantz 99f3f89f24 tests: split efl_app promise tests into separate test cases
Summary:
each test case can run in parallel, so this provides a ~300% speedup

ref T6850
Depends on D5904

Reviewers: stefan_schmidt

Subscribers: cedric

Maniphest Tasks: T6850

Differential Revision: https://phab.enlightenment.org/D5905
2018-04-10 11:28:01 +02:00
Mike Blumenkrantz 5e806ee41f tests: move ecore promise tests into efl_app_suite
Summary:
ref T6815
Depends on D5902

Reviewers: stefan_schmidt

Subscribers: cedric

Maniphest Tasks: T6815

Differential Revision: https://phab.enlightenment.org/D5903
2018-04-10 11:28:01 +02:00
Mike Blumenkrantz 3b22dbc5af tests: move efl_loop_fd tests into efl_app_suite
Summary:
ref T6815
Depends on D5898

Reviewers: stefan_schmidt

Subscribers: cedric

Maniphest Tasks: T6815

Differential Revision: https://phab.enlightenment.org/D5899
2018-04-10 11:28:01 +02:00
Mike Blumenkrantz fab4c313f4 tests: move disabled efl loop timer test into efl_app_suite
Summary:
ref T6815
Depends on D5895

Reviewers: stefan_schmidt

Subscribers: cedric

Maniphest Tasks: T6815

Differential Revision: https://phab.enlightenment.org/D5896
2018-04-10 11:28:01 +02:00
Mike Blumenkrantz e02598cd4e tests: split efl_loop tests out of efl_app_suite.c
Summary: Depends on D5894

Reviewers: stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5895
2018-04-10 11:28:01 +02:00
Mike Blumenkrantz adc601aca2 tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros

timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:25 +02:00
Carsten Haitzler 6f31f36aa8 put efl app test back with mods to match app as superclass 2018-03-03 13:40:33 +09:00
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 3e94be5d73 efl: add test suite for efl_app
this moves existing tests out of the ecore suite and into a new one,
adds some checks to verify loop object parenting, and verifies compile
for Efl_Core.h and Efl_Net.h using EFL_NOLEGACY_API_SUPPORT
2018-02-26 14:02:51 -05:00