Commit Graph

122 Commits

Author SHA1 Message Date
Cedric Bail cba58203a3 eio: move efl.io.manager.xattr.get to use the new Eina_Future. 2017-09-14 10:11:29 -07:00
Cedric Bail b9ef9af74a eio: migrate efl.io.manager.open to use Eina_Future. 2017-09-13 15:53:00 -07:00
Cedric BAIL e33d0d9996 eio: first convertion to new future/promise. 2017-09-11 16:10:46 -07:00
Gustavo Sverzut Barbieri 8dc853f230 ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the
installation file structure and thus eina_prefix works out of box.
2017-02-03 12:36:38 -02:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Cedric BAIL a7e0f26e1b eio: correctly compar double in xattr test. 2016-12-19 16:33:46 -08:00
Cedric BAIL b221fbc639 eio: fix attr tests to process an array of string. 2016-12-15 14:30:33 -08:00
Cedric BAIL 50402592bf eio: fix conversion mistake from Eina_Promise to Efl_Future. 2016-11-07 13:43:11 -08:00
Felipe Magno de Almeida 1a2014a122 efl: Update Efl.Model to use new Efl_Promise and Efl_Future
Replaced all Eina_Promise_Owner and Eina_Promise with Efl_Promise and
Efl_Future.
2016-09-29 13:12:27 -03:00
Cedric Bail d6935e983a eio: use proper const for progress. 2016-09-15 21:49:08 -07:00
Stefan Schmidt d01fa64edf tests: eio: use eina file infrastructure for temporary file creation
The tmp dir is not always /tmp.
2016-09-13 11:28:52 +02:00
Vivek Ellur fb73aabc61 eio_eet: Added test suite for eio eet module.
Summary:
Added new test suite for eio eet module

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: stefan_schmidt, jpeg, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D3316
2016-09-13 11:28:52 +02:00
Cedric BAIL 8e8c50e7a1 eio: fix manager tests. 2016-09-08 15:16:42 -07:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Stefan Schmidt a467bb30ca tests: eio: add Eina.h include for eina_init and shutdown functions.
tests/eio/eio_suite.c:33:4: warning: implicit declaration of function 'eina_init' [-Wimplicit-function-declaration]
     eina_init();
     ^
tests/eio/eio_suite.c:38:4: warning: implicit declaration of function 'eina_shutdown' [-Wimplicit-function-declaration]
    eina_shutdown();
2016-08-02 09:29:58 +02:00
Cedric Bail 351c2007f6 eio: add a test for T3237.
I have been trying to reproduce the reported ephoto issue, but couldn't. This
test case reproduce the reported scenario.
2016-07-28 21:03:12 -07:00
Cedric Bail cec3eddb41 eio: all our tests need eina and we aren't testing eina here, so init once and for all. 2016-07-28 21:03:12 -07:00
Cedric BAIL b047bf7f64 eio: register one Efl_Io_Manager by default on the main loop at init time. 2016-06-22 13:19:13 -07:00
Cedric BAIL 10aadafcfd eio: rename eio_job to efl_io_manager.
There is still a lot of work to do in this API to make it efficient and
stable. Will try to get at it before 1.18 release.
2016-06-22 13:19:13 -07:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Felipe Magno de Almeida 8e4f383d61 efl: Move promise parameter to return in data model
Summary:
Instead of:

efl_model_property_get("name", &promise);

now:

promise = efl_model_property_get("name");

Reviewers: stefan_schmidt, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4038
2016-06-16 22:01:07 -03:00
Stefan Schmidt 6d54b94db5 tests: eio: use eina file infrastructure for temporary file creation
The tmp dir is not always /tmp.
2016-06-16 14:15:25 +02:00
Stefan Schmidt ff95c52ae7 tests: eio: silence unused paramater warnings in new eio_map test 2016-06-16 14:15:24 +02:00
Vivek Ellur e2dbd0c504 eio_map: Add test suite for eio map module
Summary:
Added test suite for eio map module

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: stefan_schmidt, raster, cedric

Differential Revision: https://phab.enlightenment.org/D3321
2016-06-16 14:15:24 +02:00
Cedric BAIL b1f62061b9 eio: remove eio_model that should already be part of Eio.h. 2016-06-06 11:01:16 -07:00
Lauro Moura f15ae07188 eio: Fix leaks in tests 2016-06-06 04:32:32 -03:00
Larry Jr e14042eabe eio: Fix Eio_Model promise accessor 2016-06-05 22:08:06 -03:00
Felipe Magno de Almeida e98c57d9d4 eina: Remove more Eina_Promise* parameter in promise callback
Remove not very useful parameter to eina_promise_then callbacks.
2016-06-03 18:37:21 -03:00
Felipe Magno de Almeida e79eb53e8d eina: Remove Eina_Promise* parameter in promise callback
Remove not very useful parameter to eina_promise_then callbacks.
2016-06-03 18:15:57 -03:00
Felipe Magno de Almeida 8fec0d5139 eina: Remove unnecessary indirection to promises
Now when dealing with pointer types, we will not get pointer to
pointer semantics in callbacks and eina_promise_owner_value_set
for Eina_Promise.

It will work as expected:

Eina_Promise_Owner* promise = eina_promise_add();

void* p = malloc(sizeof(T));
eina_promise_owner_value_set(promise, p, &free);
2016-06-03 17:22:12 -03:00
Felipe Magno de Almeida ad0166f792 eio: Fix eio_test_job_xattr test
Test wasn't enabled when modifications to function prototypes to
eio_job_file_xattr_list and eio_job_file_xattr properties were
made, so it got pushed inadvertidly without the necessary
changes to user code.
2016-05-30 15:54:01 -03:00
Lauro Moura 7241b7375d eio: Adds Eo-based Eio API
The legacy Eio_File factory functions are replaced by an Eo object
called Eo_Job that return promises wrapping the async file operations.
With this commit, the legacy Eio callbacks are replaced by the following
Eo/Promises counterparts :

* Done_Cb -> Promise then success callback
* Error_Cb -> Promise then error callback
* Main_Cb -> Promise progress callback
* Filter_Cb -> Job object event (more below)

Events are used to deliver and get the filter data. To differentiate
between the named and direct versions, they come in "filter,direct" and
"filter,name" versions.

Monitors were wrapped inside a new class Eo_Sentry.

The user creates a sentry object and adds monitoring targets to it,
listening to events on it.

The sentry event info is composed of two strings. The source string
is the path being monitored, i.e. the one passed to eio_sentry_add, and
the trigger string is the path that actually triggered the event, e.g.
a new file created in a monitored directory.
2016-05-25 21:32:03 -03:00
Lauro Moura 0eacdc03da eio: Call correct function to cleanup Eio_File.
The Eio functions operating on Eina_Files were just freeing
the Eio_File pointer on completion instead of calling eio_file_free
to unregister the thread.
2016-05-25 21:32:03 -03:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Stefan Schmidt 3256a60282 tests: eio: make sure we cleanup eio_test_xattr_set correctly
We missed tmpstr_del and shutting down eina here. This test segfaults from
time to time on Jenkins. Not sure this was the actual cause but better clean
it up anyway.
2016-05-11 10:17:11 +02:00
Tom Hacohen 138d4e1353 Efl model: Remove the no longer needed .Base hack. 2016-05-10 11:36:35 +01:00
Larry Jr 5230309b02 Eio: fixed eio_model_test_monitor_add
fix filename comparison in the test for deleted file
2016-05-03 18:48:01 -03:00
Stefan Schmidt fc51b44ed4 tests: eio: re-enable eio test cases
Have been disabled with 0c76f82a. They pass here so re-enabling.
2016-05-03 11:30:23 +02:00
Stefan Schmidt b917eb4c25 tests: eio: use the correct eina_promise_* functions
When these changes got it with 0c76f82a31
they used the non existing symbols ecore_promise_value_get and
ecore_promise_then (most likely due to an unfinished refactoring)

Make sure we actually use the correct eina_promise_ symbols and add NULL
for the error callback which is now needed.
2016-05-03 09:36:37 +02:00
Felipe Magno de Almeida e69f41001b eio: Fix unused variable warnings in test
Use of EINA_UNUSED in unused parameters
2016-04-29 17:32:23 -03:00
Larry Jr 0c76f82a31 Efl, Eio, Eldbus, Elementary: new model API use eina_promise
Efl - efl_model_base changed to use eina_promise
Eio - eio_model use efl_model_base with promise
Eldbus - elddbus models use promise now
Elementary - elm_view_list and elm_view_form use new models with promise

updated all related examples and tests
2016-04-29 13:21:24 -03:00
Tom Hacohen f14305024e Eo event: rename Eo_Event->event_info to Eo_Event->info.
The previous naming was redundant and too long.
2016-04-12 15:23:55 +01:00
Tom Hacohen 8706d03b43 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Tom Hacohen e71e6561ee Eo callbacks: Migrate all of the EFL to the new event cb signatures. 2016-02-29 11:33:27 +00:00
Vincent Torri e15c61beb3 Test rework #12: Eio 2016-02-16 12:41:06 +00:00
Vincent Torri 0497b9685c efl: add binary mode to open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:06:04 +01:00
Vincent Torri 3b44645363 efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:04:36 +01:00
Vivek Ellur b41e66c1ef Eio: Fixes T2831, eio xattr tests failing
Summary:
@Fix
The eio_file_xattr test was failing in jenkins, so added a new callback
and moved the check condition to callback. The condition is checked
only when it is successfully executed

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: jpeg, cedric

Maniphest Tasks: T2831

Differential Revision: https://phab.enlightenment.org/D3400
2015-12-03 09:56:11 +01:00
Vincent Torri 11846b406b Tests: use eina_environment_tmp_get() 2015-10-15 09:34:33 +01:00
Tom Hacohen c4cbdca127 Eio model test: initialise pointer (clang warning).
This is probably not an issue because the function should always
return a value, but initialising this variable silence clang's
warning and is not harmful anyway.
2015-10-09 12:23:43 +01:00
Yomi 626003ce0c Fix grammar in error messages.
Summary:
Changes:

     src/examples/eio/eio_file_copy.c
     src/tests/eio/eio_test_file.c
     src/tests/eio/eio_test_xattr.c

Reviewers: cedric, thiepha, Hermet

Reviewed By: thiepha, Hermet

Subscribers: thiepha, cedric

Differential Revision: https://phab.enlightenment.org/D2912
2015-08-07 17:06:23 +09:00
vivek 400436cd1a eina_xattr: Fixed T2381, eina xattr tests failing
Summary:
This fixes the case where the system runs with SELinux enabled and enforced.
In this scenario the system does add a selinux attribute to new files which
we need to handle during our testing.

@Fix

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: stefan_schmidt, cedric

Maniphest Tasks: T2381

Differential Revision: https://phab.enlightenment.org/D2467
2015-05-06 08:42:55 +02:00
vivek 254aac64a1 eio: fix compilation warnings in eio_test_xattr.c when xattr tests are disabled.
Summary: Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2438

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-28 11:37:11 +02:00
kabeer khan b869a4e02c eio: add new tests for eio.
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2414

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-28 11:37:11 +02:00
vivek d86ed2a46c eio: add testcases for various eio_xattr types set and get functions.
Summary:
Added test cases for eio_file_xattr_string_set, eio_file_xattr_string_get, eio_file_xattr_int_set, eio_file_xattr_int_get, eio_file_xattr_double_get, eio_file_xattr_double set functions

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D2380

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-22 15:10:20 +02:00
Cedric BAIL 880310617e eio: forgot to test when xattr tests are disable. 2015-04-19 09:50:29 +02:00
Cedric BAIL d7bad56e72 eio: this should not be visible outside of this file. 2015-04-18 18:50:27 +02:00
vivek 2e7c348aca eio: add test cases for eio xattr module.
Summary:
Added test cases for eio_file_xattr, eio_file_xattr_set and eio_file_xattr_get functions

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2374

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-18 18:50:27 +02:00
kabeer khan 351a30cfc7 eio: add new tests for eio.
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2360

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-16 19:21:45 +02:00
Felipe Magno de Almeida 37a04b09d2 eio-model: Fixed crash when files are created in the temporary dir
Fixed a crash when temporary files were created before the tested file, causing a dereference of a NULL pointer.
2015-04-10 17:23:12 -03:00
Felipe Magno de Almeida d02f99ee21 eio-model: Fix Eio model races in tests
Removed sleep and implemented a deterministic way to test if the test has really finished.
2015-04-09 22:47:17 -03:00
Felipe Magno de Almeida 7928609a29 efl: move emodel to be an efl interfaces. 2015-04-05 16:23:38 +02:00
Daniel Zaoui d33508f407 Tests: fix warnings.
@TAsn, I checked the code to be sure nothing is wrong :P
2015-03-18 11:26:29 +02:00
pierre lamot de767cabfa eio: don't restart a monitor on MacOSX when every paths have been removed.
This patch check that when a monitor is removed the FSEvent service, it is
not restarted if there is no more paths to monitor. This was generating an
error message from FSEvent.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-17 10:42:51 +01:00
pierre lamot d958afd9fd eio: add OSX implementation of eio_monitor based on FSEvent
this patch adds an implementation of eio_monitor based on FSEvent
for OSX. This implentation has some limitations compared to inotify
implementation. Folowing events are not detected:
  - EIO_MONITOR_FILE_CLOSED
  - EIO_MONITOR_SELF_RENAME
  - EIO_MONITOR_SELF_DELETED

It should be noted that some events that happend before the call
to eio_monitor_add can be catched. This is why sleep timers have
been added in the test suite.

Tests have been added to check uncovered scenarios.

some things might still be improved:
  - self_deleted events for files might be handled by checking the
    file_name manually

  - self_deleted events for directories might be handled by setting
    kFSEventStreamCreateFlagWatchRoot. I've noticed by doing so that
	a lot more unwanted event are raised

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:59 +01:00
plamot 19200a878a eio: add unit tests for eio file and directory monitoring.
this patch adds units test to check the behavior of eio file
and directory monitoring module

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:58 +01:00