Commit Graph

333 Commits

Author SHA1 Message Date
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 2fb5cc3ad0 efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad and
168849e8a0
2018-03-29 13:30:55 +09:00
Cedric BAIL 4c4177ac20 efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07:00
Carsten Haitzler eb0b826776 ecore thread queue tests - reduce size and craziness and fix 1
1 test was wrong. it didn't wait for the thread to exit before checking
msg count recieved. fixed. race condition here.

also reduce the sheer message counts sent - it makes the suite take a
lot longer than is sane and als consume massive amounts of log space
in /tmp as a result.
2018-03-03 13:40:33 +09:00
Carsten Haitzler d8bd4e15d4 ecore file test - change url to a file we control.
rthe ecore file download test was downloading from sf.net ... and i
noticed sf.net refusing thus the ecore tests suite failing... i
changes it to grab a file (rss.php which is disabled for us but there)
so at least enlightenment.org has it.

better would be to spawn a webserver and test against that locally.
but thats a whole other level of work.
2018-03-03 13:40:33 +09: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 1bdd9e4dd1 ecore - a different take on efl.app class as a super class to efl.loop
so the MAIN loop is actually an efl.app object. which inherits from
efl.loop. the idea is that other loops in threads will not be efl.app
objects. thread on the creator side return an efl.thread object.
inside the thread, like the mainloop, there is now an efl.appthread
object that is for all non-main-loop threads.

every thread (main loop or child) when it spawns a thread is the
parent. there are i/o pipes from parnet to child and back. so parents
are generally expected to, if they want to talk to child thread, so
use the efl.io interfaces on efl.thread, and the main loop's elf.app
class allows you to talk to stdio back to the parent process like the
efl.appthread does the same using the efl.io interfaces to talk to its
parent app or appthread. it's symmetrical

no tests here - sure. i have been holding off on tests until things
settle. that's why i haven't done them yet. those will come back in a
subsequent commit

for really quick examples on using this see:

https://phab.enlightenment.org/F2983118
https://phab.enlightenment.org/F2983142

they are just my test code for this.

Please see this design document:

https://phab.enlightenment.org/w/efl-loops-threads/
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
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Mike Blumenkrantz 30e52e9413 ecore_audio: remove "name" property 2018-02-15 13:11:00 -05:00
Myoungwoon Roy, Kim 211093b7c5 ecore_event: Check for the valid type
Summary:
This patch checks for the valid types.
As mentioned API reference documentation, user must know its type before hand.
The type should be chedked like previous efl version and ecore_event_type_flush_internal()

Test Plan: Execute a ecore test suite.

Reviewers: cedric, raster, jpeg, stefan_schmidt, Jaehyun_Cho

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5776
2018-01-31 18:55:40 +09:00
Myoungwoon Roy, Kim e9d1a1e988 ecore_main: Check for the valid flag
Summary:
This patch checks for the valid Ecore_Fd_Handler_Flags.
The flags should be checked like previous verion because
There are no default handlings in case of out of Ecore_Fd_Handler enum values in other funcs.

Test Plan: Execute a test case

Reviewers: cedric, raster, jpeg, stefan, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5775
2018-01-31 18:55:40 +09:00
Vincent Torri ef0f0a50b2 Ecore_File: remove symlinks support on Windows (library and test) 2018-01-30 16:52:24 +09:00
Myoungwoon Roy, Kim 6bb2b8b402 ecore_timer: Check for the valid callback func
Summary:
This patch checks whether the callback function is valid or not.
Callback function must be set up for the class.

Test Plan: Execute test suite

Reviewers: cedric, raster, stefan, Jaehyun_Cho

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5762
2018-01-30 14:43:11 +09:00
Lauro Moura 3a6ff3c6b3 tests: Check return value in tests.
GCC was complaining about ignored return values from realpath, chdir,
etc.
2018-01-25 15:27:05 -03:00
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Jean-Philippe Andre 85b2a8669a ecore: Shutdown ecore after running tests
Those test cases should verify that the threads have exited cleanly, and
then we can shutdown ecore.

CK_FORK=no ecore_suite passes
2017-12-19 13:53:09 +09:00
Jean-Philippe Andre cb20ad9f53 ecore: Fix up some test cases
- Add missing ecore_shutdown
- Reinstate supposedly silly test case (see previous commits, the main
  loop object can in fact die cleanly).
- Disable really silly test cases (inner main loops aren't meant to
  work)
2017-12-19 12:21:29 +09:00
Carsten Haitzler 5bd7beb53f tests - disable loop fd and timer lifecycle tests
these tests assume we delete the loop object on shutdown which we are
not doing atm as it's a lot of trouble... and frankly of little value.
2017-12-15 14:16:53 +09:00
Carsten Haitzler 6d2226385c tests - ecore promise - assuming a single loop iterate... wrong
this should really be an ecore_main_loop_begin plus a quit condition.
2017-12-15 14:16:53 +09:00
Carsten Haitzler 4d7d5913dd tests - ecore suite - dont shadow a global var - use different one 2017-12-15 14:16:53 +09:00
Cedric BAIL c976f16606 ecore: rename efl_loop_Eina_FutureXXX_idle to efl_loop_idle 2017-12-11 14:04:09 -08:00
Cedric BAIL d614894d04 ecore: rename efl_loop_Eina_FutureXXX_job to efl_loop_job. 2017-12-11 14:04:09 -08:00
Cedric BAIL 2ee19c1d0f ecore: remove test of efl_loop_job. 2017-12-11 14:04:09 -08:00
Cedric Bail 25747d0881 ecore: rename efl_loop_Eina_FutureXXX_timeout to efl_loop_timeout. 2017-12-03 16:30:53 -08:00
Cedric Bail c6d4614f8c ecore: remove efl_loop_timeout tests. 2017-12-03 16:09:14 -08:00
Cedric Bail 383e3a761e ecore: remove a test from old efl_promise to remove use of efl_loop_timeout. 2017-12-03 16:01:09 -08:00
Lauro Moura 7db2485193 ecore: Avoid using newer check.h functions.
Summary:
The ptr_null/nonnull were added in the 0.11 version of libcheck. The
required version in configure.ac is 0.9.10 (some distros still use this
old one).

Reviewers: felipealmeida, stefan_schmidt

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5220
2017-09-22 09:57:06 +02:00
Gustavo Sverzut Barbieri 22cee38239 Efl_Loop: add job, timeout and idle based on Eina_Future.
Since some clash with old version, then add Eina_FutureXXX to their
name, later we'll sed.
2017-09-04 10:24:00 -03:00
Guilherme Iscaro 3ba9f25cf7 Eina_Promise/Eina_Future: Add example and tests. 2017-09-04 10:24:00 -03:00
Jean-Philippe Andre 44b6eb3e55 tests: Fix eina_thread_queue test case 5 & 6
ecore_test_ecore_thread_eina_thread_queue_t6 failed often for me.
eina_thread_queue_wait() was returning NULL.

I believe this is because the test case ended abruptly without
waiting for the threads to finish. Indeed, both threads tried
hard to reach 10000 messages but it didn't make sense for them
both to reach this value, only one would end there.

This patch adds an exit message sent by thread 1 to the two other
threads, and all threads are waited upon using a single semaphore.

Note: This also renames some functions to match their test case
number.

@raster
2017-06-14 16:54:15 +09:00
Cedric BAIL d70bcb94cb ecore: add test to make sure that the timer reset during callback work as expected. 2017-02-07 16:39:02 -08: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 e94967da72 ecore: implement new requirement in the test suite. 2017-02-02 16:56:57 -08:00
Cedric BAIL 2b7a68eb1b ecore: add test for efl_promise_connect. 2016-12-16 14:10:58 -08:00
Cedric BAIL b7635be57d ecore: add tests for new promise delayed behavior. 2016-12-16 14:10:58 -08:00
Cedric BAIL c1811de61f ecore: fix test to generate one main loop iteration to see promise fulfilled. 2016-12-16 14:10:58 -08:00
Stefan Schmidt d46829f0f9 tests: ecore: detect if the timeout test runs on Jenkins and increase allowed offset
From time to time we run into trouble with this test. It goes over the, already
increased, limit on Jenkins. Most likely due to high load on the server. Neither
Cedric nor me have been able to pin this down on local runs and we already had
increased it from the initial 0.01 to 0.02 but just today we hit 0.38.

What we do now is to detect if we run on our jenkins and increase the allowed value
while having the intial lower value back for normal local runs.
2016-12-09 11:09:47 +01:00
Cedric BAIL 6d7c6445f8 ecore: simplify suite name as I try to spot an intermitent failure.
While running ecore_suite, I, some times, see a failure in the thread queue test,
sadly I can't reproduce it while just executing :
CK_RUN_CASE=Eina_Thread_Queue  ./tests/ecore/ecore_suite
2016-11-07 14:05:55 -08:00
Cedric BAIL 1f7d96e167 ecore: remove Eina_Promise tests. 2016-11-07 11:18:37 -08:00
Cedric BAIL af3788439b ecore: remove tests for ecore_thread_promise_run. 2016-11-07 10:47:31 -08:00
Stefan Schmidt a69506db44 tests: ecore_promise: removed unused variable
Looks like a copy and paste bug form the other tests.
2016-11-04 12:28:11 +01:00
Cedric BAIL a7ff7ceebb ecore: cleanup test 2016-11-03 18:03:16 -07:00
Cedric BAIL a614303fb6 ecore: add check to make sure that the order of future_get and value_set can be switched. 2016-11-03 18:03:16 -07:00
Vitor Sousa 10e4e65250 ecore: add test for efl_future_then after value_set 2016-11-03 18:03:16 -07:00
Carsten Haitzler 4ed2e01591 remove xcb support in ecore_x and evas engines as per mailing list
as per mailing list discussion about dropping xcb support now. it
hasn't been complete for a long time, thus not recommented for being
turned on. as we are moving to a wayland world xcbmakes even less
sense. as agreed, time to clean up a bit and remove a distraction as
well as not well tested code. this also updates po's too.

@feature
2016-11-03 22:22:54 +09:00
Cedric BAIL b5f2b695b7 ecore: test recursive case on efl_future. 2016-10-19 13:40:49 -07:00
Stefan Schmidt a6d3c0d0fd tests: ecore: switch from fprintf to ck_asser_msg macro for custom error message
The ck_assert_msg macro can do this for us already in a failed case.
2016-09-20 12:46:37 +02:00
Cedric BAIL 71ec6a95b8 ecore: fix warning in timer test. 2016-09-19 16:27:14 -07:00
Stefan Schmidt c25d4e8325 tests: ecore: relax the timing precision for the promise timeout test
This test has been failing on Jenkins again and again. After adding the debug
a while ago it now shows that the value is between 0.01 and 0.02 in all cases
I have seen. Relaxing the timeout here a bit to make it pass in situation where
our CI is under load.
2016-09-19 14:01:19 +02:00
Cedric Bail b741580329 ecore: migrate job and timeout tests to use efl_future. 2016-09-15 21:49:08 -07:00
Cedric Bail de0a54f0b9 ecore: make sure that progress type have the proper const. 2016-09-15 21:49:08 -07:00
Cedric BAIL bd362b13d6 efl: add documentation and last cleanup of the API. 2016-09-08 15:16:43 -07:00
Cedric Bail d8310b7180 ecore: test efl_future_link. 2016-09-08 14:58:06 -07:00
Cedric Bail 5edb42d371 ecore: add test for efl_future_race. 2016-09-08 14:58:06 -07:00
Cedric Bail 61957ace36 ecore: add tests for efl_future_all. 2016-09-08 14:58:05 -07:00
Cedric Bail 674acaf63d ecore: add tests for Efl.Promise. 2016-09-08 14:58:05 -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
Stefan Schmidt f52ffec5dd tests: ecore: add some debug for ecore timer test case
This tests fails on Jenkins from time to time. The timeout is to big. Adding
some debug here top see how far we are off when this happens.
2016-09-05 11:21:54 +02: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
Jean Guyomarc'h 5b8315aeff ecore-tests: make sure we always get a canonical path
There may be extraneous slashes that are contained in the returned
generated directories (because they were put there in environment
variables). Since we test with string comparison, some tests would fail
due to different environment setups.
2016-08-29 20:03:52 +02:00
Gustavo Sverzut Barbieri e56811ed4d eina_error: allow errno.h codes.
we have some duplication of errors between Eina_Error and errno.h,
however we should use Eina_Error to extend the traditional errno.h
system.

then change eina_error_msg_register() and
eina_error_msg_static_register() to return a magic bit to state the
number was registered, and on other functions test this bit in order
to operate on registered values, otherwise fallback to errno.h, such
as strerror().

It also deprecates 2 clear duplicated errors:

- EINA_ERROR_OUT_OF_MEMORY -> ENOMEM

- EINA_ERROR_TIMEOUT -> ETIMEDOUT

There are two details when using strerror():

 - old behavior did not return strings for non-error, such as
   "Success" or "Unknown error ${N}"

 - thread-safety issues: since we must be thread safe, then use
   strerror_r() and eina_stringshare_add() that value, keeping a hash
   of cached values
2016-08-18 13:36:05 -03: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
Carsten Haitzler 84e4cf7145 ecore imf test - remove unused variable 2016-08-05 20:34:42 +09:00
Carsten Haitzler adc5cd422a ecore eina thread queue test - be anal about thread exiting cleanly 2016-08-05 20:20:25 +09:00
Carsten Haitzler 720f17619e ecore eina threadqueue test suite - be correct about volatile+padding
fill in the padding of mesages (10 bytes) with something so valgrinds
can be happy and use vlatiole for msgs count as the msgs num should
have been incremented already before the msg sned is done and main
thread/loop gets the msg
2016-08-05 14:35:41 +09:00
Carsten Haitzler 013c0702f4 ecore_imf - fix make check to doa "load all" check after de-sillifying it
this should make ecore_imf testable with empty env vars also meaning
no env var and the make check test will now ensuree this is set to
exactly test this.
2016-08-05 13:42:11 +09:00
Stefan Schmidt 9c8eea6ad8 tests: ecore: try to keep constness for Efl_Version
It returns as const so better try to keep this be having the avriable const as
well.
2016-07-29 14:59:43 +02:00
Cedric BAIL 649f120326 ecore: add test case for tick begin/end. 2016-07-13 15:32:15 -07:00
Stefan Schmidt f8ca9b5cc8 tests: ecore_audio: disable stalling audio_obj_pulse test
This test is stalling. Locally as well as on Jenkins. I tried to bisect it
without any luck. Even running it from the 1.17 release it does no longer work
so i guess it is some change coming from a pulse update on my system. I have
version 7.1 here. As we have no-one working actively on ecore_audio I disable
the test here and we can track the problem on T4018.
2016-07-05 11:14:30 +02:00
Stefan Schmidt 493df60950 tests: ecore_audio: remove dead code
These test cases do not exist and the code is commented out for a long time.
2016-07-05 11:14:30 +02:00
Stefan Schmidt 2a9c000859 tests: ecore_audio: move _finished_cb behind PULSE guard
This callback is only used from the pulse object test.
2016-07-05 11:14:30 +02:00
Jean-Philippe Andre 2b9e9b3667 ecore: Add basic test case for efl version
Not very useful test but still good to make sure we
preserve the API.
2016-06-29 15:01:34 +09:00
Cedric BAIL 86862e7179 ecore: fix typo in test.
Thanks Stefan.
2016-06-28 11:11:07 -07:00
Cedric BAIL c512bb68e7 ecore: fix Windows build by properly defining EAPI in all case for internal API user. 2016-06-23 10:53:46 -07:00
Cedric BAIL 068f57a79d ecore: fix arguments to use Eo native array type. 2016-06-22 14:36:39 -07:00
Cedric BAIL ae207a5be6 ecore: add test for registered provider. 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
Lauro Moura 46843551c0 eina: Remove value type promises
All values in promises are now considered as by-pointer.
2016-06-09 22:38:54 -03:00
Cedric BAIL 2db02da4bd ecore: make sure lifecycle of Efl.Loop.Fd is correct. 2016-06-06 16:29:16 -07:00
Cedric BAIL cd0b50fada ecore: add a tests that ensure we do implement lifecycle correctly. 2016-06-06 15:41:24 -07:00
Lauro Moura 47dea6abc1 eina: Avoid promise early deletion when cancelled.
Cancelling a promise will fulfill it but won't actually free the memory. This
memory is under custody of the owner, who must either call value_set or
error_set to finish it.
2016-06-06 03:09:40 -03:00
Lauro Moura 217f3ce842 ecore: Fix ecore thread promises
Make sure we free the promise memory, set MAGIC numbers and avoid
leaking the underlying eina promise
2016-06-05 21:59:35 -03:00
Cedric BAIL b7facb2f0b ecore: add a test for detecting the double free problem. 2016-06-03 17:00:12 -07:00
Cedric BAIL 5cc16b1c29 ecore: remove Ecore_Animator Eo object.
This is only a legacy API.
2016-06-03 17:00:12 -07: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
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Carsten Haitzler 47e3b171a3 efl test suite - test args event and args values 2016-05-31 17:16:14 +09:00
Felipe Magno de Almeida 1ed8759e1a ecore: eldbus: Fix prototype for promise then_cb new prototype
Added Eina_Promise parameter and removed indirection for Eina_Error.
2016-05-26 13:35:07 -03:00
Felipe Magno de Almeida b0b8109cd5 eina: Make cancelled promises use EINA_ERROR_PROMISE_CANCELLED error code 2016-05-26 13:35:07 -03:00
Felipe Magno de Almeida de9be13d45 eina: Add promise parameter to then calllbacks
Added promise parameter to then callbacks so callbacks can steal
ownership of the value from the promise.
2016-05-25 21:32:03 -03:00
Cedric Bail 4f43c27450 ecore: promise for timeout and job are clearly never optional, so return them. 2016-05-20 02:25:48 -07:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Carsten Haitzler 54272809ed ecore audio test - improve samples for ecore audio test 2016-05-18 02:02:45 +09:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Cedric Bail 559441bdd5 ecore: make timeout test that the timeout does happen at least after it is supposed to.
The test had to been relaxed to allow the server to be overloaded !
2016-05-15 06:44:49 -07:00
Felipe Magno de Almeida 6d43adaaf4 eina: Fix memory leaks in promise 2016-05-07 13:55:18 -03:00
Cedric BAIL 359657f1f1 ecore: add tests case for Efl.Loop.Fd. 2016-05-06 15:35:36 -07:00
Cedric BAIL a1bd7a7499 ecore: add timeout promise test. 2016-05-04 15:42:59 -07:00
Cedric BAIL 950701b738 ecore: silence warning in job test. 2016-05-04 15:42:59 -07:00
Cedric Bail 664d677201 ecore: add test case for Efl.Loop.Job. 2016-05-02 18:17:09 -07:00
Cedric Bail cfdc09fa93 ecore: fix promise test wrong use of EINA_UNUSED. 2016-05-02 18:17:09 -07:00
Felipe Magno de Almeida f534fb8943 ecore: add tests for promises with ecore_thread_promise_run
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-05 11:35:12 -07: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 7d8cd6c40f Revert "ecore: Create Promises"
Reverting this at Felipe's request following my email. There are many
things I strongly object to in this commit. I've touched the surface of
those on the ML (which doesn't work at the moment), though we need to
better discuss it.

The gist:
1. dlsym is a really bad hack that is not even needed.
2. I don't see why eo should even be aware of promises. It's not aware
of list, hash and etc.
3. The eolian changes were done wrong.

This should have been discussed and consulted before done, even if only
because of the amount of hacks it includes and the cross-domain (ecore,
eo and eolian) nature of it.

This reverts commit f9ba80ab33.
2016-03-08 14:23:57 +00:00
Felipe Magno de Almeida f9ba80ab33 ecore: Create Promises
Add a promise object that allows Eolian interface to include promises
as a way to have asynchronous value return and composibility.

The usage is like this in a .eo file:

class Foo {
   methods {
      bar {
         params {
            promise: Promise<int>;
         }
      }
   }
}

Which will create the following API interface:

void foo_bar(Ecore_Promise** promise);

and the equivalent declaration for implementation.

However, the API function will instantiate the Promise for the
user and the implementer of the class.
2016-03-06 17:55:33 -03:00
Stefan Schmidt d32aa995e0 tests: disable loading of the scim module as this can causes hangs of the tests
With scim installed we can run into hangs of the test suite when the ecore_imf
scim module tries to connect to the scim on the system. This has happened again
and again on different installations and made the test suite really fragile.

We would need to make sure that scim is configured on the host before we could
run this test. It might be a candidate for skipped tests where we check if the
env has all we need to run the test and if not skip it. We don not have all the
needed pieces in place for this so the best we can do to make the test runs less
fragile is disabling scim module loading for now.
2016-03-04 15:41:42 +01: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 da98142de6 Test rework #1: Ecore
Factorisation of the infra
make uniform all the tests
2016-02-16 12:41:06 +00:00
Jean-Philippe Andre 0402b5fd12 Ecore: Remove all temporary files after running make check 2016-01-19 18:18:29 +09:00
Jean Guyomarc'h 4fad2ce0fe ecore_evas/tests: add tests for Ecore_Evas_Cocoa 2016-01-14 11:35:09 +01:00
Jean Guyomarc'h 5aa49cb218 ecore_evas/tests: remove trailing whitespaces
Cosmetic changes only
2016-01-14 11:35:09 +01:00
Felipe Magno de Almeida a3db1dddd3 efl-js: JavaScript Eolian binding
To configure efl sources with bindings to use in nodejs add ––with-js=nodejs in configure flags to generate node files

$ configure --with-js=nodejs

and compile normally with:

$ make
$ make install

To use, you have to require efl:

efl = require('efl')

The bindings is divided in two parts: generated and manually
written. The generation uses the Eolian library for parsing Eo files
and generate C++ code that is compiled against V8 interpreter library
to create a efl.node file that can be required in a node.js instance.

@feature
2015-12-23 23:59:40 -02: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 081e9894d4 ecore: add test case for idler enterer function
Summary:
Added test case for ecore_idle_enterer_before_add function

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

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-31 02:37:20 +01:00
Carsten Haitzler b1600b2daa efl tests - ecore fb - disable as it basically is more pain than gain
this means make check is more useful to people.
2015-10-22 19:19:50 +09:00
Vincent Torri 11846b406b Tests: use eina_environment_tmp_get() 2015-10-15 09:34:33 +01:00
Vivek Ellur 4f604e4d1e eina_queue: add test cases in eina thread queue module
Summary:
Added test cases for eina_thread_queue_parent_get and eina_thread_queue_fd_get
functions

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

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 14:01:23 -07:00
Tom Hacohen 52d998f475 Eo base: Remove the free_func parameter from key_data_set.
This was not really useful and against the Eolian guidelines.
While I promised I won't break things until the 27th, I was ill
(still am), so I'm giving myself a 1 day pass. :P
2015-05-28 17:47:59 +01:00
Tom Hacohen 4dc0aba991 Ecore file test: Fix access to uninitialized memory. 2015-05-20 16:27:00 +01:00
Tom Hacohen a00bbffd3f Ecore tests: REMOVE wayland tests.
These tests aren't really testing anything, and are just broken and annoying.
They only test init and shutdown, and they require a running wayland compositor.

They fail for anyone that has wayland enabled but not running in a wayland session.

They should be brought back once they actual test something, or once we allow skipping
tests that can't be run due to environment issues.
2015-05-08 16:18:36 +01:00
Tom Hacohen 7072ca435a Ecore tests: Properly split (some) unit tests to units
Units were not properly split. We also had to resort to hacks we are not
allowed to do before, which are now fixed.
We don't allow shutting down and powering up again. Once something is off,
it's off.
2015-05-08 16:18:36 +01:00
Tom Hacohen f5494bd906 Ecore audio test: Remove unneeded test.
We don't need to test eo works in the ecore audio suite.
If you mark it as virtual, it's virtual.
2015-05-08 16:18:36 +01:00
Thiep Ha 5c4eea6fff ecore_file: add more tests for ecore_file.
Summary:
This patch adds more tests for ecore_file.
It helps examine unchecked cases.

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-28 11:37:11 +02:00
kabeer khan 1b8aaa9e4e ecore_file: fix crashing test of ecore_file
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-17 12:05:23 +02:00
kabeer khan 398378bf90 ecore_file: improved Ecore_File_Download test.
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-15 14:15:48 +02:00
kabeer khan a15e70b3e2 ecore_file tests: Added new tests in ecore_file
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2331
2015-04-10 14:38:24 +02:00
Srivardhan Hebbar 4b0e879591 ecore_con: Split ecore_con test suite from ecore.
Summary:
Have created ecore_con test suite.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, Sergeant_Whitespace, stefan_schmidt

Subscribers: stefan_schmidt, Sergeant_Whitespace, cedric

Maniphest Tasks: T2235

Differential Revision: https://phab.enlightenment.org/D2269
2015-04-06 16:37:53 +02:00
Srivardhan Hebbar 3f35bc341a ecore_con: add tests case related to HTTP post and ftp upload.
Summary:
Made http and ftp url configurable via configure and also added test cases for ftp upload and http post.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: Sergeant_Whitespace, cedric

Subscribers: Sergeant_Whitespace, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-06 16:37:52 +02:00
Srivardhan Hebbar 5a0588c256 ecore_con: add tests cases to cover more scenarios in local sockets.
Summary:
In this patch, ecore_test_ecore_con_local_system_negport test case was failing.

Note that this patch does play with some environment variable to check more
code path in ecore_con.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:57:28 +01:00
Srivardhan Hebbar fcd9a331a6 ecore_con: add test case for download related functions.
Summary:
This has test cases for download related functions. Will make url
configurable and add post/upload related functions in the coming patch.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:45:26 +01: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
Srivardhan Hebbar cd5e21591a ecore_con: add more test cases related to ssl functions.
Summary:

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-13 09:33:29 +01:00
Cedric BAIL 65d0c2a1e1 ecore: don't leak directory during testing of Ecore_File infrastructure. 2015-03-13 09:33:28 +01:00
Cedric BAIL 85b5393ea9 ecore_con: fix uninitialized warning in tests suite. 2015-03-12 07:43:59 +01:00
Srivardhan Hebbar 5b27425782 ecore_con: add test cases related to SSL.
Summary:
Add test cases related to SSL. Now it is not crashing and all test cases passes.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-06 20:19:21 +01:00
Cedric BAIL 272e8b70ff ecore: remove warning from tests case. 2015-02-23 17:35:22 +01:00
Stefan Schmidt 46829c05fe Revert "ecore: fix path comparison in Ecore_File test suite."
This reverts commit 66c0f3261d.

This commit breaks the eina_file suite on Gentoo (our jenkins OS).

ref T2105
2015-02-12 10:47:02 +01:00
Srivardhan Hebbar 53172c2d79 ecore_con: add ecore con client functions for testing.
Summary: Added ecore con client functions to the existing cases to cover more functions.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 17:23:35 +01:00
Srivardhan Hebbar 024880add4 ecore_con: add test cases to test ecore_con_server and client with different options.
Summary: Before ecore_con_server_add and client add with only TCP sockets. Have made that function generic and testing for other options too. Not all options are covered. Need to add different kind of cases for other options. Will check how I can add and add.

Reviewers: stefan_schmidt, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-09 22:03:27 +01:00
pierre lamot 9ee7f46eb3 ecore: check that a test doesn't enter in an infitie loop.
check that ecore_test_ecore_thread_eina_thread_queue_t6 doesn't
enter in an infinite loop if something goes wrong, if the main thread
doesn't receive the message number 10000

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:06 +01:00
pierre lamot 66c0f3261d ecore: fix path comparison in Ecore_File test suite.
The Ecore_File test suite was comparing path with strcmp,
which can lead to incorect comparison in some case (comparing
realpath and expected path for instance)

This patch adds a function to compare paths within this tests. Paths
are compared by getting the "realpath" of each operand

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:06 +01:00