summaryrefslogtreecommitdiff
path: root/src/tests/ecore/efl_app_test_promise.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-04-09 13:37:04 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-10 11:28:01 +0200
commit99f3f89f241082a00cdd1bc7b7d9b908e6de549e (patch)
tree9292b1e1fae122b9a18916406d3224edde4a0ef4 /src/tests/ecore/efl_app_test_promise.c
parent43c420d3d0a973f70d0908688a50d4be1ca4e53e (diff)
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
Diffstat (limited to 'src/tests/ecore/efl_app_test_promise.c')
-rw-r--r--src/tests/ecore/efl_app_test_promise.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/tests/ecore/efl_app_test_promise.c b/src/tests/ecore/efl_app_test_promise.c
index e719e53..3b9b8ab 100644
--- a/src/tests/ecore/efl_app_test_promise.c
+++ b/src/tests/ecore/efl_app_test_promise.c
@@ -694,7 +694,7 @@ EFL_START_TEST(efl_test_promise_future_implicit_cancel)
694 The promise was resolved, but the mainloop is not running. 694 The promise was resolved, but the mainloop is not running.
695 Since ecore_shutdown() will be called all the futures must be cancelled 695 Since ecore_shutdown() will be called all the futures must be cancelled
696 */ 696 */
697 ecore_shutdown(); 697 ck_assert_int_eq(ecore_shutdown(), 0);
698 //All the futures were cancelled at this point 698 //All the futures were cancelled at this point
699 fail_if(cancel_count != CHAIN_SIZE); 699 fail_if(cancel_count != CHAIN_SIZE);
700 //Cancel should not be called, since we called eina_promise_resolve() 700 //Cancel should not be called, since we called eina_promise_resolve()
@@ -1334,28 +1334,42 @@ promise_shutdown(void)
1334void efl_app_test_promise(TCase *tc) 1334void efl_app_test_promise(TCase *tc)
1335{ 1335{
1336 tcase_add_checked_fixture(tc, promise_init, promise_shutdown); 1336 tcase_add_checked_fixture(tc, promise_init, promise_shutdown);
1337 tcase_add_test(tc, efl_test_timeout); 1337 tcase_add_test(tc, efl_test_promise_future_convert);
1338 tcase_add_test(tc, efl_test_job); 1338 tcase_add_test(tc, efl_test_promise_future_easy);
1339 tcase_add_test(tc, efl_test_idle); 1339 tcase_add_test(tc, efl_test_promise_future_all);
1340 tcase_add_test(tc, efl_test_promise_future_race);
1341 tcase_add_test(tc, efl_test_promise_future_ignore_error);
1340 tcase_add_test(tc, efl_test_promise_future_success); 1342 tcase_add_test(tc, efl_test_promise_future_success);
1341 tcase_add_test(tc, efl_test_promise_future_failure); 1343 tcase_add_test(tc, efl_test_promise_future_failure);
1344}
1345
1346void efl_app_test_promise_2(TCase *tc)
1347{
1348 tcase_add_checked_fixture(tc, promise_init, promise_shutdown);
1342 tcase_add_test(tc, efl_test_promise_future_chain_no_error); 1349 tcase_add_test(tc, efl_test_promise_future_chain_no_error);
1343 tcase_add_test(tc, efl_test_promise_future_chain_error); 1350 tcase_add_test(tc, efl_test_promise_future_chain_error);
1344 tcase_add_test(tc, efl_test_promise_future_cancel); 1351 tcase_add_test(tc, efl_test_promise_future_cancel);
1345 tcase_add_test(tc, efl_test_promise_future_implicit_cancel); 1352 tcase_add_test(tc, efl_test_promise_future_implicit_cancel);
1346 tcase_add_test(tc, efl_test_promise_future_inner_promise); 1353 tcase_add_test(tc, efl_test_promise_future_inner_promise);
1347 tcase_add_test(tc, efl_test_promise_future_inner_promise_fail); 1354 tcase_add_test(tc, efl_test_promise_future_inner_promise_fail);
1348 tcase_add_test(tc, efl_test_promise_future_convert); 1355}
1349 tcase_add_test(tc, efl_test_promise_future_easy); 1356
1350 tcase_add_test(tc, efl_test_promise_future_all); 1357void efl_app_test_promise_3(TCase *tc)
1351 tcase_add_test(tc, efl_test_promise_future_race); 1358{
1352 tcase_add_test(tc, efl_test_promise_future_ignore_error); 1359 tcase_add_checked_fixture(tc, promise_init, promise_shutdown);
1360 tcase_add_test(tc, efl_test_timeout);
1361 tcase_add_test(tc, efl_test_job);
1362 tcase_add_test(tc, efl_test_idle);
1353 tcase_add_test(tc, efl_test_promise_log); 1363 tcase_add_test(tc, efl_test_promise_log);
1354 //FIXME: We should move this to EO tests, however they depend on Ecore... 1364 //FIXME: We should move this to EO tests, however they depend on Ecore...
1355 tcase_add_test(tc, efl_test_promise_eo); 1365 tcase_add_test(tc, efl_test_promise_eo);
1356 tcase_add_test(tc, efl_test_promise_eo_link); 1366 tcase_add_test(tc, efl_test_promise_eo_link);
1367}
1357 1368
1369void efl_app_test_promise_safety(TCase *tc)
1370{
1358#ifdef EINA_SAFETY_CHECKS 1371#ifdef EINA_SAFETY_CHECKS
1372 tcase_add_checked_fixture(tc, promise_init, promise_shutdown);
1359 tcase_add_test(tc, efl_test_promise_null); 1373 tcase_add_test(tc, efl_test_promise_null);
1360 tcase_add_test(tc, efl_test_promise_reject_resolve_null); 1374 tcase_add_test(tc, efl_test_promise_reject_resolve_null);
1361 tcase_add_test(tc, efl_test_future_null); 1375 tcase_add_test(tc, efl_test_future_null);