Commit Graph

38 Commits

Author SHA1 Message Date
Mike Blumenkrantz 59ad959e85 tests/ecore: ensure that we attempt to re-set PATH in ecore-file tests
Summary:
if this test failed before for any reason, PATH would be permanently changed
for the current shell and process, which is obviously not what we want
Depends on D10414

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10415
2019-10-24 18:23:14 +02:00
Mike Blumenkrantz 30f6c12cbf tests/ecore: replace all bespoke strcats with snprintf
Summary:
CID 1400812
Depends on D10413

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10414
2019-10-24 18:23:11 +02:00
Mike Blumenkrantz 8cef6a9724 tests: fix minor string leaks
Summary: CIDs 1404754, 1401022, 1400965

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10405
2019-10-18 13:29:13 -04:00
Lauro Moura d0e10dd273 ecore: Fix download test.
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-30 15:22:03 -04:00
Vincent Torri ba22016c4c tests: fix warnings and undef ref on Windows (using meson :-) )
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-20 12:50:35 +01:00
Christopher Michael 9ea2e60b29 ecore_test_ecore_file: Fix resource leak
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-05-02 13:48:00 +02:00
Mike Blumenkrantz 6ee58996e1 tests/ecore: check uid on ecore-file tests
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-07-09 13:31:20 -04:00
Mike Blumenkrantz 7aeab74e41 tests: add timeout to fixture for ecore tests
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-12 11:03:59 -04:00
Mike Blumenkrantz 59520a57cb tests: remove extra download in ecore_test_ecore_file_download
Summary:
this function is just a wrapper, avoid downloading the same file
multiple times

ref T6853
Depends on D5885

Reviewers: stefan_schmidt

Subscribers: cedric

Maniphest Tasks: T6853

Differential Revision: https://phab.enlightenment.org/D5886
2018-04-10 11:28:01 +02:00
Mike Blumenkrantz a04e7be83a tests: use different website for ecore_test_ecore_file_download
Summary:
while it may be the case that we do not control example.com, it is also
the case that loading anything from enlightenment.org takes 10+ seconds
longer (at minimum) than loading example.com

ref T6853
Depends on D5884

Reviewers: stefan_schmidt

Subscribers: cedric

Maniphest Tasks: T6853

Differential Revision: https://phab.enlightenment.org/D5885
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 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
Vincent Torri ef0f0a50b2 Ecore_File: remove symlinks support on Windows (library and test) 2018-01-30 16:52:24 +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
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
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
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
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
Vincent Torri 11846b406b Tests: use eina_environment_tmp_get() 2015-10-15 09:34:33 +01:00
Tom Hacohen 4dc0aba991 Ecore file test: Fix access to uninitialized memory. 2015-05-20 16:27:00 +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
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
Cedric BAIL 65d0c2a1e1 ecore: don't leak directory during testing of Ecore_File infrastructure. 2015-03-13 09:33:28 +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
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
kabeer khan 0ba1239ac1 Ecore FIle: Added test case for ecore_file download
Summary:
Added test cases for ecore_file_download and ecore_file_download_full

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1683
2014-11-24 09:36:02 -05:00
kabeer khan 9f65759387 Ecore File : Added test suite for Ecore File module
Summary:
Added 3 test cases. First to test initialise, shutdown Ecore_File module.
Second to test all file operation functions defined in the module.
Third to test ecore file monitor

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1662
2014-11-18 10:51:42 +01:00
Stefan Schmidt 4d66ed9b1f Revert "Ecore File : Added test suite for Ecore File module"
Same problem with this as for the revert before. Fails when run the second
time. See last commit for details.

This reverts commit 5866e166bb.
2014-11-10 11:40:55 +01:00
Stefan Schmidt 2f9d5d19fe Revert "Ecore File: Added test case for Ecore File Monitor"
This breaks make check and distcheck when run more than once. I first look
seems to indicate that the hardcoded /tmp/rootDir is not removed during
shutdown and fials to be created the next time as it is already present.

When removing it manually another problem with the subdir popped up. No
time to fix this just before I want to do the release so this gets
reverted. Please fix this up and submit it again for 1.13. Thanks.

This reverts commit cb84017a3f.
2014-11-10 11:38:10 +01:00
Stefan Schmidt 1721c8e043 Revert "ecore-tests: Fix formatting"
This commit alone is fine but it does changes to another commit that needs
reverting as it breaks make check / distcheck and thus this one has to be
reverted as well.

This reverts commit 652e2f688b.
2014-11-10 11:36:48 +01:00
Chris Michael 652e2f688b ecore-tests: Fix formatting
Summary: No functional changes, just formatting.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-11-03 08:17:34 -05:00
kabeer khan cb84017a3f Ecore File: Added test case for Ecore File Monitor
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1634
2014-11-03 08:16:57 -05:00
kabeer khan 5866e166bb Ecore File : Added test suite for Ecore File module
Summary:
Added 2 test cases. First to test initialise, shutdown Ecore_File module and second to test all file operation functions defined in the module.

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1600
2014-10-29 09:01:59 -04:00