summaryrefslogtreecommitdiff
path: root/src/tests/ecore (follow)
AgeCommit message (Collapse)Author
2019-07-30ecore: Fix download test.Lauro Moura
Summary: After ecore_main_loop_quit() changes, calling it from outside the main loop does not make the next iteration of the main loop quit, causing the original version of the test to deadlock. Also update the function documentation about it. Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, felipealmeida, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9448
2019-07-25tests/ecore: verify that quit() -> begin() does not pre-cancel main loopMike Blumenkrantz
Summary: ref 17f433c57bfa11319a22fde1aedb21e99a3a1268 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9375
2019-07-17eo: use efl_provider_{un,}register infrastructure instead of Efl_Loop one.Cedric BAIL
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9296
2019-06-20ecore: do not rely on implicit rules for memory lifecycle during test.Cedric BAIL
Summary: alloca force the memory to be accessible for the entire duration of the scope of the function it is called from. This will garantee that the memory pointer are not recycled under our feet before we check them. T8020 Reviewers: zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8020 Differential Revision: https://phab.enlightenment.org/D9127
2019-06-20tests: fix warnings and undef ref on Windows (using meson :-) )Vincent Torri
Summary: we need to include evil_private.h so that some symbols are declared Test Plan: compilation Reviewers: raster, zmike, cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9129
2019-06-19Fix miscellaneous build warningsXavi Artigas
Nothing serious, but they were driving me mad.
2019-05-15meson: enforce 61s timeout for tests, remove explicit timeouts from build filesMike Blumenkrantz
unit tests automatically abort with info after 60s, and tests should be run with an appropriate timeout to avoid conflict with the test runner's default 30s timeout set explicit timeout in eio test for now because there's still frequent bugs here Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8894
2019-05-09ecore: make sure that ecore stay initialized during the full test.Cedric BAIL
efl_app_test_promise.c is slightly special and corrective action have to be taken to make sure that ecore_init return the right value when the no fork mode of libcheck is used. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8566
2019-05-02ecore_test_ecore_file: Fix resource leakChristopher Michael
Summary: Coverity reports that we leak the store returned from ecore_file_realpath so add a call to free the returned storage when we are done with it Fixes CID1400825 @fix Depends on D8777 Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8778
2019-04-17build: use only BUILD_ECORE_IMF_XIM as a defineMike Blumenkrantz
Summary: meson and autotools were a bit out of sync with this, resulting in unexpected behavior Reviewers: billiob Reviewed By: billiob Subscribers: billiob, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8641
2019-04-02tests: unset eina log callback at end of each efl_app promise testMike Blumenkrantz
Summary: ensure that this doesn't trigger cascading errors Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8514
2019-04-02eo: Correctly name Realized classes.Lauro Moura
The previous preprocessor rule was generating strings like "\"Efl.App\"_Realized. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8527
2019-03-11eolian: enable checking of beta/stable contexts in all classesDaniel Kolesa
Summary: This enables all the checks unconditionally, without ignoring classes that don't have an Efl namespace. This required a lot of beta marking to make it build. It most likely doesn't mark types correctly, as that is not fully enabled yet. Reviewers: zmike, cedric, segfaultxavi, bu5hm4n Reviewed By: segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8266
2019-03-08efl.loop_timer: rename all methods/properties/eventsMike Blumenkrantz
Summary: avoid potential future conflict by not using conflict-able names ref T7731 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7731 Differential Revision: https://phab.enlightenment.org/D8256
2019-02-25eolian: validate betanessMarcel Hollerbach
Summary: if there is a none beta class, then this class should not depend on beta classes in parameters / event types / return types, parent inherits. This adds this validation, so we can start to slowly to unbeta more and more classes. Reviewers: q66, zmike, cedric, segfaultxavi Reviewed By: q66 Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7999
2019-02-21efl_loop / efl_app: make efl_app / efl_loop abstractMarcel Hollerbach
this is done inorder to ensure that noone ever thinks of creating theire own app/loop object. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7982
2019-02-15cmdline iface - fix to consume input array AND strings totallyCarsten Haitzler (Rasterman)
strings often enough are generated e.g. via "%s/%s" or "%i" or similar etc. ... i have poitned to examples, so move to make all strings consistently stringshared, fix a bug added to the efl thread code where it accessed and freed array even tho array was consumed (but not strings) in the set, and the code used free to consume not stringshare_del. fix other code and tests to match EXCTLY the kind of bugs and mistakes with this kind of design that i said would happen more often just happened...
2019-02-13eolian: drop class function overridingMarcel Hollerbach
Until this commit eo did class functions as part of the vtable, which enabled those functions to be overwritten in classes inheriting another class. However in task T7675 we decided that this is not really good for bindings, as most OOP languages do not support this sort of feature. After this commit eolian realizes class function completly outside of the vtable, the c-symbol that is the class funciton is now just directly redirecting to a implementation, without the involvement of the vtable. This also means a change to the syntax created by eo: Calling before: class_function(CLASS_A); Calling after: class_function(); Implementation before: class_function(const Eo *obj, void *pd) { ... } Implementation after: class_function(void) { ... } This fixes T7675. Co-authored-by: lauromauro <lauromoura@expertisesolutions.com.br> Reviewed-by: Daniel Kolesa <daniel@octaforge.org> Differential Revision: https://phab.enlightenment.org/D7901
2019-02-12Revert "Revert command line array object because it's broken by design"Marcel Hollerbach
This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e. I pretty much hate to just revert your revert, but you failed to read my replies, and failed to understand what i was talking about. And YES we talked at fosdem about the platform issue, and do you remember my answer, that back in time this might be the case, today is different freebsd suppoerts setenv, and for windows we have a setenv implementation in evil. And yes, vtorri also created a issue how bad and evil this commit is, however, i still fail to see the issue since setenv unsetenv and clearenv usages are taken as needed. (T7693) The ownership question is answered in https://phab.enlightenment.org/D7516#137367. Can we please get into a state of technical discussions, and not *oh shit, i am going to revert this* this has been in review for a long time, a lots of people have tested it, we discussed things on it, and there was 3 weeks of no reply from you. The issues that exist will be dealed with. Feel free to create tasks if you want :)
2019-02-12Revert "Revert the env object because it's broken portability - please redo"Marcel Hollerbach
This reverts commit d6294fa22b88187e44391c1c8ca64b1ebdf14533.
2019-02-12Revert the env object because it's broken portability - please redoCarsten Haitzler (Rasterman)
setenv and unsetenv are not portable. i explained to you at fosdem there are issues and it's why i used putenv in the original implementation and even though it's a pain (the string tou pass to putenv is a pointer used literallt from there on in and you get it from getenv, thus making ownership a pain -this is a libc issue we can't readily solve). use putenv like the original code. then put it back in. vtorri now has windows porting issues with the setenv use. i knew there was a reason that still existed... in addition your in_sync stuff is broken. psuedocode: // assuming BLAGH env is not set to anything here c = efl_core_env_get(global_env, "BLAH"); ... putenv("BLAH=10"); ... c = efl_core_env_Get(global_env, "BLAH"); i will get NULL in both cases for c ... but i should get "10" for the 2nd in reality. reality is lots of code across application code and libraries will at times mess with the environment. it has to work with this. the prior implementation did work with this. Revert "ecore: here comes a env object" This reverts commit 2373d5db5b4cd5dfe139aa2a10017ef61b28b5ce. Revert "efl_task: remove env from this object" This reverts commit c3d69f66a69c0def357a5c373a13343e1c01ff5d.
2019-02-12Revert command line array object because it's broken by designCarsten Haitzler (Rasterman)
Revert "ecore: get rid of commands in efl_task." This reverts commit 616381e9cfed41b83fef039b0e38c09b41fd3d7f. Revert "ecore: here comes a command line object" This reverts commit 48e5684b3c37b337edd7004e68fc0690b58a84e6. 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-12ecore: here comes a command line objectMarcel Hollerbach
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-12ecore: here comes a env objectMarcel Hollerbach
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-04tests: improve efl loop test (concentric)Mike Blumenkrantz
I forgot to spin the sub-loop, so this was previously just a test to verify that the IDLE callback was working. now this spins the sub-loop on the idle callback and tests the idle enter callback to verify that the main loop is being iterated Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Differential Revision: https://phab.enlightenment.org/D7874
2019-02-01tests: add explicit test for concentric loop usageMike Blumenkrantz
having multiple loops which interact is a valid use case that should be tested to ensure functionality Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Differential Revision: https://phab.enlightenment.org/D7868
2019-01-26ecore: make ecore_audio_out abstractMarcel Hollerbach
ecore_audio does define format and source, those are then used in some leave classes, ecore_audio is only used in the tests, and should not be used externally. Therefore make it abstract. The other missing implementations are in the leave classes, They are resolved with providing empty implementations, since no format switching is supported. ref T5719 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7782
2019-01-23tests/ecore: reenable ecore-audio play testMike Blumenkrantz
this seems to work now fix T4018 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D7723
2019-01-09efl: remove warning due to unused variable/parameters.Cedric BAIL
Reviewers: #committers, felipealmeida, zmike Reviewed By: #committers, felipealmeida, zmike Subscribers: zmike, YOhoho, Hermet, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7554
2018-12-20efl_app: introduce app_main for getting the app objectMarcel Hollerbach
This brings in the possibility to receive the app object from bindings. With the app object you can listen to pause / args / terminate / resume events. fix T7509 Differential Revision: https://phab.enlightenment.org/D7480
2018-12-07ecore: add a full test for efl_future_then and efl_future_chain.Cedric BAIL
Summary: Depends on D7392 Reviewers: bu5hm4n, segfaultxavi Reviewed By: bu5hm4n, segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7472 Differential Revision: https://phab.enlightenment.org/D7393
2018-12-07ecore: fix typo in comments.Cedric BAIL
Summary: Depends on D7391 Reviewers: bu5hm4n, segfaultxavi, kimcinoo Reviewed By: kimcinoo Subscribers: kimcinoo, #reviewers, #committers Tags: #efl Maniphest Tasks: T7472 Differential Revision: https://phab.enlightenment.org/D7392
2018-12-07ecore: add efl_app_test to the meson build and run the test.Cedric BAIL
Summary: Depends on D7390 Reviewers: bu5hm4n, segfaultxavi Reviewed By: bu5hm4n Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7472 Differential Revision: https://phab.enlightenment.org/D7391
2018-12-07ecore: efl_app_suite doesn't need to depends on Efl_Net.Cedric BAIL
Summary: Depends on D7381 Reviewers: bu5hm4n, segfaultxavi Reviewed By: segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7472 Differential Revision: https://phab.enlightenment.org/D7390
2018-12-07eo: make efl_future_then have a data pointer in addition of the object pointer.Cedric BAIL
Summary: In the case when you have multiple future in flight related to one object, you couldn't use the previous version of efl_future_then. Now all function calls take a void* pointer that allow multiple future to have their private data request data accessible in all the callback. This should not break released API as Eo.h is not released yet and so was efl_future_Eina_FutureXXX_then. Depends on D7332 Reviewers: felipealmeida, segfaultxavi, vitor.sousa, SanghyeonLee, bu5hm4n Reviewed By: segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7472 Differential Revision: https://phab.enlightenment.org/D7379
2018-10-02here comes mesonMarcel Hollerbach
a new shiny buildtool that currently completes in the total of ~ 4 min.. 1 min. conf time 2:30 min. build time Where autotools takes: 1:50 min. conf time 3:40 min. build time. meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read. Further informations can be gathered from the README.meson Right now, bindings & windows support are missing. It is highly recommented to use meson 0.48 due to optimizations in meson that reduced the time the meson call would need. Co-authored-by: Mike Blumenkrantz <zmike@samsung.com> Differential Revision: https://phab.enlightenment.org/D7012 Depends on D7011
2018-08-31docs: Fix typos in API reference doc and comments.Yeongjong Lee
Reviewers: Hermet, segfaultxavi Reviewed By: Hermet, segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6948
2018-08-17ecore_pipe: remove null check condition and fix segfualt on WindowsYeongjong Lee
Summary: This reverts commit 4917910b4911905236fa099bbc16b833b056ca07. 4917910b break backward compatibility. Reproduction: void pipe_handler(...); pipe = ecore_pipe_add(pipe_handler, NULL); ecore_pipe_write(pipe, NULL, 0); Because of the null check condition, pipe_handler isn't called after 4917910b. Some apps behavior which is written to expected to call pipe_handler was broken. also, this patch fixed segfault during build on Windows Test Plan: make on Windows Reviewers: raster, zmike, vtorri Reviewed By: zmike, vtorri Subscribers: woohyun, cedric, #reviewers, #committers, zmike, vtorri Tags: #efl Differential Revision: https://phab.enlightenment.org/D6824
2018-08-02ecore: fix that timers are not called in the order they were registered.Hosang Kim
Summary: Timers are not called in the order they were registered. Because when current timer is deleted, getting next timer is called twice. Test Plan: <error> Timer1 expired after 0.001 seconds. Timer3 expired after 0.001 seconds. Timer5 expired after 0.001 seconds. Timer7 expired after 0.001 seconds. Timer2 expired after 0.001 seconds. Timer6 expired after 0.001 seconds. Timer4 expired after 0.001 seconds. Timer8 expired after 0.001 seconds. <correct> Timer1 expired after 0.001 seconds. Timer2 expired after 0.001 seconds. Timer3 expired after 0.001 seconds. Timer4 expired after 0.001 seconds. Timer5 expired after 0.001 seconds. Timer6 expired after 0.001 seconds. Timer7 expired after 0.001 seconds. Timer8 expired after 0.001 seconds.| {F3268233} Reviewers: Hermet, Jaehyun_Cho, zmike, SanghyeonLee Reviewed By: zmike Subscribers: cedric, #committers, zmike Tags: #efl_tests Differential Revision: https://phab.enlightenment.org/D6700
2018-07-30tests/ecore: remove tolerance threshold from ecore_timer_reset test caseMike Blumenkrantz
unit tests should test one thing only: testing timer accuracy and the effectiveness of resetting a timer in the same test leads to timing issues, so remove the timing component from the test ref T6878 Differential Revision: https://phab.enlightenment.org/D6653
2018-07-10tests/ecore: remove ecore-drm testMike Blumenkrantz
Summary: this caused DSO linker issues when enabled and was only testing init+shutdown for a deprecated component which has not been actively developed in some time Reviewers: devilhorns, ManMower, bu5hm4n Reviewed By: devilhorns, ManMower Subscribers: bu5hm4n, ManMower, cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6539
2018-07-09tests/ecore: check uid on ecore-file testsMike Blumenkrantz
Summary: these tests will fail if run with root permission, so avoid checking them when run as root ref T7094 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: T7094 Differential Revision: https://phab.enlightenment.org/D6534
2018-06-27tests: ignore ibus module in ecore-imf tests when DISPLAY is not setMike Blumenkrantz
Summary: ibus module will refuse to load if DISPLAY is not set, so avoid failing for no reason in this case Depends on D6433 Reviewers: ManMower, bu5hm4n, devilhorns Reviewed By: devilhorns Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6434
2018-06-27tests: avoid cascading failure in ecore-imf tests when not forkingMike Blumenkrantz
Summary: these tests explicitly call ecore_imf_init, so they must call ecore_imf_shutdown even on failure cases to avoid propagating their failure to subsequent tests ref T7085 Reviewers: ManMower, bu5hm4n, devilhorns Reviewed By: devilhorns Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: T7085 Differential Revision: https://phab.enlightenment.org/D6433
2018-06-12tests: make ecore timeout special casing dependent on check versionMike Blumenkrantz
Summary: tcase_name() was added in 0.11.0 (2016), which is still not widely enough distributed to rely upon without version checks Reviewers: stefan_schmidt, ManMower, devilhorns Reviewed By: ManMower Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6260
2018-06-12tests: add timeout to fixture for ecore testsMike Blumenkrantz
Summary: this is mainly to handle the case of ecore-file, which fetches external resources during the test and requires an active network connection which may fail to resolve/connect/download during the test. if this particular test fails then it is almost certainly a network issue a future patch should implement some form of http server to remove the dependency on external network resources also probably all test suites should have timeout timers just in case fix T6950 Depends on D6205 Reviewers: stefan_schmidt, cedric Reviewed By: cedric Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: T6950 Differential Revision: https://phab.enlightenment.org/D6206
2018-06-12tests: improve ecore timer test codeMike Blumenkrantz
Summary: a stack variable was incorrectly used here, along with some lazy timing calcs which did not accurately measure the time for each timer iteration, resulting in a test which intermittently failed in some cases fix T6878 Reviewers: stefan_schmidt, bu5hm4n, ManMower Reviewed By: ManMower Subscribers: ManMower, cedric, #committers Tags: #efl Maniphest Tasks: T6878 Differential Revision: https://phab.enlightenment.org/D6256
2018-05-24Revert "efl_add_ref - fis to use efl_add properly with a parent."Cedric BAIL
This reverts commit 2fb5cc3ad09f6aaf82b5d1131ac5ed22ed848bd4. Most of this change where wrong as they didn't affect the destruction of the object. efl_add_ref allow for manual handling of the lifecycle of the object and make sure it is still alive during destructor. efl_add will not allow you to access an object after invalidate also efl.parent.get will always return NULL once the object is invalidated. Differential Revision: https://phab.enlightenment.org/D6062
2018-04-10tests: split ecore thread queue tests into 2 test casesMike Blumenkrantz
Summary: enable running these tests in parallel ref T6851 Depends on D5905 Reviewers: stefan_schmidt Subscribers: cedric Maniphest Tasks: T6851 Differential Revision: https://phab.enlightenment.org/D5906
2018-04-10tests: split efl_app promise tests into separate test casesMike Blumenkrantz
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