summaryrefslogtreecommitdiff
path: root/src/tests/edje
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-03-26 14:19:28 -0400
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-05 11:10:25 +0200
commitadc601aca2f0a16784af36bf6ae7dd20eeb33202 (patch)
treecac0a78fa40e88abb028b06d985c28bf89da269c /src/tests/edje
parentb340b5e49ccae48a7d5adbbfa301af39e232348c (diff)
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>
Diffstat (limited to 'src/tests/edje')
-rw-r--r--src/tests/edje/edje_suite.h2
-rw-r--r--src/tests/edje/edje_test_edje.c92
2 files changed, 47 insertions, 47 deletions
diff --git a/src/tests/edje/edje_suite.h b/src/tests/edje/edje_suite.h
index 35ab20d793..a6f1354fec 100644
--- a/src/tests/edje/edje_suite.h
+++ b/src/tests/edje/edje_suite.h
@@ -2,7 +2,7 @@
2#define _EDJE_SUITE_H 2#define _EDJE_SUITE_H
3 3
4#include <check.h> 4#include <check.h>
5 5#include "../efl_check.h"
6void edje_test_edje(TCase *tc); 6void edje_test_edje(TCase *tc);
7 7
8 8
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index 6432062917..2a366741f1 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -16,7 +16,7 @@
16 16
17#define EVAS_DATA_DIR TESTS_SRC_DIR "/../../lib/evas" 17#define EVAS_DATA_DIR TESTS_SRC_DIR "/../../lib/evas"
18 18
19START_TEST(edje_test_edje_init) 19EFL_START_TEST(edje_test_edje_init)
20{ 20{
21 int ret; 21 int ret;
22 22
@@ -26,9 +26,9 @@ START_TEST(edje_test_edje_init)
26 ret = edje_shutdown(); 26 ret = edje_shutdown();
27 fail_if(ret != 0); 27 fail_if(ret != 0);
28} 28}
29END_TEST 29EFL_END_TEST
30 30
31START_TEST(edje_test_edje_load) 31EFL_START_TEST(edje_test_edje_load)
32{ 32{
33 Evas *evas = EDJE_TEST_INIT_EVAS(); 33 Evas *evas = EDJE_TEST_INIT_EVAS();
34 Edje_Load_Error error; 34 Edje_Load_Error error;
@@ -41,7 +41,7 @@ START_TEST(edje_test_edje_load)
41 41
42 EDJE_TEST_FREE_EVAS(); 42 EDJE_TEST_FREE_EVAS();
43} 43}
44END_TEST 44EFL_END_TEST
45 45
46static const char * 46static const char *
47test_layout_get(const char *name) 47test_layout_get(const char *name)
@@ -53,7 +53,7 @@ test_layout_get(const char *name)
53 return filename; 53 return filename;
54} 54}
55 55
56START_TEST(edje_test_load_simple_layout) 56EFL_START_TEST(edje_test_load_simple_layout)
57{ 57{
58 Evas *evas = EDJE_TEST_INIT_EVAS(); 58 Evas *evas = EDJE_TEST_INIT_EVAS();
59 Evas_Object *obj; 59 Evas_Object *obj;
@@ -67,9 +67,9 @@ START_TEST(edje_test_load_simple_layout)
67 67
68 EDJE_TEST_FREE_EVAS(); 68 EDJE_TEST_FREE_EVAS();
69} 69}
70END_TEST 70EFL_END_TEST
71 71
72START_TEST(edje_test_simple_layout_geometry) 72EFL_START_TEST(edje_test_simple_layout_geometry)
73{ 73{
74 int x, y, w, h; 74 int x, y, w, h;
75 int r, g, b, a; 75 int r, g, b, a;
@@ -96,9 +96,9 @@ START_TEST(edje_test_simple_layout_geometry)
96 96
97 EDJE_TEST_FREE_EVAS(); 97 EDJE_TEST_FREE_EVAS();
98} 98}
99END_TEST 99EFL_END_TEST
100 100
101START_TEST(edje_test_complex_layout) 101EFL_START_TEST(edje_test_complex_layout)
102{ 102{
103 int x, y, w, h; 103 int x, y, w, h;
104 Evas *evas = EDJE_TEST_INIT_EVAS(); 104 Evas *evas = EDJE_TEST_INIT_EVAS();
@@ -144,9 +144,9 @@ START_TEST(edje_test_complex_layout)
144 144
145 EDJE_TEST_FREE_EVAS(); 145 EDJE_TEST_FREE_EVAS();
146} 146}
147END_TEST 147EFL_END_TEST
148 148
149START_TEST(edje_test_calculate_parens) 149EFL_START_TEST(edje_test_calculate_parens)
150{ 150{
151 int x, y, w, h; 151 int x, y, w, h;
152 Evas *evas = EDJE_TEST_INIT_EVAS(); 152 Evas *evas = EDJE_TEST_INIT_EVAS();
@@ -167,9 +167,9 @@ START_TEST(edje_test_calculate_parens)
167 167
168 EDJE_TEST_FREE_EVAS(); 168 EDJE_TEST_FREE_EVAS();
169} 169}
170END_TEST 170EFL_END_TEST
171 171
172START_TEST(edje_test_masking) 172EFL_START_TEST(edje_test_masking)
173{ 173{
174 int x, y, w, h; 174 int x, y, w, h;
175 Evas *evas = EDJE_TEST_INIT_EVAS(); 175 Evas *evas = EDJE_TEST_INIT_EVAS();
@@ -201,9 +201,9 @@ START_TEST(edje_test_masking)
201 201
202 EDJE_TEST_FREE_EVAS(); 202 EDJE_TEST_FREE_EVAS();
203} 203}
204END_TEST 204EFL_END_TEST
205 205
206START_TEST(edje_test_filters) 206EFL_START_TEST(edje_test_filters)
207{ 207{
208 Evas *evas = EDJE_TEST_INIT_EVAS(); 208 Evas *evas = EDJE_TEST_INIT_EVAS();
209 const Evas_Object *text, *sub; 209 const Evas_Object *text, *sub;
@@ -242,9 +242,9 @@ START_TEST(edje_test_filters)
242 242
243 EDJE_TEST_FREE_EVAS(); 243 EDJE_TEST_FREE_EVAS();
244} 244}
245END_TEST 245EFL_END_TEST
246 246
247START_TEST(edje_test_snapshot) 247EFL_START_TEST(edje_test_snapshot)
248{ 248{
249 Evas *evas = EDJE_TEST_INIT_EVAS(); 249 Evas *evas = EDJE_TEST_INIT_EVAS();
250 const Evas_Object *sub; 250 const Evas_Object *sub;
@@ -266,9 +266,9 @@ START_TEST(edje_test_snapshot)
266 266
267 EDJE_TEST_FREE_EVAS(); 267 EDJE_TEST_FREE_EVAS();
268} 268}
269END_TEST 269EFL_END_TEST
270 270
271START_TEST(edje_test_size_class) 271EFL_START_TEST(edje_test_size_class)
272{ 272{
273 int minw, minh, minw2, minh2; 273 int minw, minh, minw2, minh2;
274 Evas *evas = EDJE_TEST_INIT_EVAS(); 274 Evas *evas = EDJE_TEST_INIT_EVAS();
@@ -320,9 +320,9 @@ START_TEST(edje_test_size_class)
320 320
321 EDJE_TEST_FREE_EVAS(); 321 EDJE_TEST_FREE_EVAS();
322} 322}
323END_TEST 323EFL_END_TEST
324 324
325START_TEST(edje_test_color_class) 325EFL_START_TEST(edje_test_color_class)
326{ 326{
327 Evas *evas = EDJE_TEST_INIT_EVAS(); 327 Evas *evas = EDJE_TEST_INIT_EVAS();
328 328
@@ -355,9 +355,9 @@ START_TEST(edje_test_color_class)
355 355
356 EDJE_TEST_FREE_EVAS(); 356 EDJE_TEST_FREE_EVAS();
357} 357}
358END_TEST 358EFL_END_TEST
359 359
360START_TEST(edje_test_swallows) 360EFL_START_TEST(edje_test_swallows)
361{ 361{
362 Evas *evas = EDJE_TEST_INIT_EVAS(); 362 Evas *evas = EDJE_TEST_INIT_EVAS();
363 Evas_Object *ly, *o1, *o2; 363 Evas_Object *ly, *o1, *o2;
@@ -386,9 +386,9 @@ START_TEST(edje_test_swallows)
386 386
387 EDJE_TEST_FREE_EVAS(); 387 EDJE_TEST_FREE_EVAS();
388} 388}
389END_TEST 389EFL_END_TEST
390 390
391START_TEST(edje_test_swallows_eoapi) 391EFL_START_TEST(edje_test_swallows_eoapi)
392{ 392{
393 Evas *evas = EDJE_TEST_INIT_EVAS(); 393 Evas *evas = EDJE_TEST_INIT_EVAS();
394 Evas_Object *ly, *o1, *o2; 394 Evas_Object *ly, *o1, *o2;
@@ -417,9 +417,9 @@ START_TEST(edje_test_swallows_eoapi)
417 417
418 EDJE_TEST_FREE_EVAS(); 418 EDJE_TEST_FREE_EVAS();
419} 419}
420END_TEST 420EFL_END_TEST
421 421
422START_TEST(edje_test_access) 422EFL_START_TEST(edje_test_access)
423{ 423{
424 Evas *evas = EDJE_TEST_INIT_EVAS(); 424 Evas *evas = EDJE_TEST_INIT_EVAS();
425 const char *name; 425 const char *name;
@@ -460,9 +460,9 @@ START_TEST(edje_test_access)
460 460
461 EDJE_TEST_FREE_EVAS(); 461 EDJE_TEST_FREE_EVAS();
462} 462}
463END_TEST 463EFL_END_TEST
464 464
465START_TEST(edje_test_box) 465EFL_START_TEST(edje_test_box)
466{ 466{
467 Evas *evas; 467 Evas *evas;
468 Evas_Object *obj, *sobj, *sobjs[5]; 468 Evas_Object *obj, *sobj, *sobjs[5];
@@ -499,9 +499,9 @@ START_TEST(edje_test_box)
499 499
500 EDJE_TEST_FREE_EVAS(); 500 EDJE_TEST_FREE_EVAS();
501} 501}
502END_TEST 502EFL_END_TEST
503 503
504START_TEST(edje_test_box_eoapi) 504EFL_START_TEST(edje_test_box_eoapi)
505{ 505{
506 Evas *evas; 506 Evas *evas;
507 Evas_Object *obj, *sobj, *sobjs[5]; 507 Evas_Object *obj, *sobj, *sobjs[5];
@@ -559,9 +559,9 @@ START_TEST(edje_test_box_eoapi)
559 559
560 EDJE_TEST_FREE_EVAS(); 560 EDJE_TEST_FREE_EVAS();
561} 561}
562END_TEST 562EFL_END_TEST
563 563
564START_TEST(edje_test_table) 564EFL_START_TEST(edje_test_table)
565{ 565{
566 Evas *evas; 566 Evas *evas;
567 Evas_Object *obj, *sobj, *sobjs[4]; 567 Evas_Object *obj, *sobj, *sobjs[4];
@@ -634,9 +634,9 @@ START_TEST(edje_test_table)
634 634
635 EDJE_TEST_FREE_EVAS(); 635 EDJE_TEST_FREE_EVAS();
636} 636}
637END_TEST 637EFL_END_TEST
638 638
639START_TEST(edje_test_table_eoapi) 639EFL_START_TEST(edje_test_table_eoapi)
640{ 640{
641 Evas *evas; 641 Evas *evas;
642 Evas_Object *obj, *sobj, *sobjs[4], *proxy; 642 Evas_Object *obj, *sobj, *sobjs[4], *proxy;
@@ -716,9 +716,9 @@ START_TEST(edje_test_table_eoapi)
716 716
717 EDJE_TEST_FREE_EVAS(); 717 EDJE_TEST_FREE_EVAS();
718} 718}
719END_TEST 719EFL_END_TEST
720 720
721START_TEST(edje_test_combine_keywords) 721EFL_START_TEST(edje_test_combine_keywords)
722{ 722{
723 Evas *evas; 723 Evas *evas;
724 Evas_Object *obj; 724 Evas_Object *obj;
@@ -730,7 +730,7 @@ START_TEST(edje_test_combine_keywords)
730 730
731 EDJE_TEST_FREE_EVAS(); 731 EDJE_TEST_FREE_EVAS();
732} 732}
733END_TEST 733EFL_END_TEST
734 734
735static void 735static void
736_message_signal_reply_cb(void *data, Evas_Object *obj EINA_UNUSED, 736_message_signal_reply_cb(void *data, Evas_Object *obj EINA_UNUSED,
@@ -760,7 +760,7 @@ _message_signal_reply_cb(void *data, Evas_Object *obj EINA_UNUSED,
760 (*id)++; 760 (*id)++;
761} 761}
762 762
763START_TEST(edje_test_message_send_legacy) 763EFL_START_TEST(edje_test_message_send_legacy)
764{ 764{
765 Evas *evas; 765 Evas *evas;
766 Evas_Object *obj; 766 Evas_Object *obj;
@@ -814,9 +814,9 @@ START_TEST(edje_test_message_send_legacy)
814 814
815 EDJE_TEST_FREE_EVAS(); 815 EDJE_TEST_FREE_EVAS();
816} 816}
817END_TEST 817EFL_END_TEST
818 818
819START_TEST(edje_test_message_send_eo) 819EFL_START_TEST(edje_test_message_send_eo)
820{ 820{
821 Evas *evas; 821 Evas *evas;
822 Evas_Object *obj; 822 Evas_Object *obj;
@@ -872,9 +872,9 @@ START_TEST(edje_test_message_send_eo)
872 872
873 EDJE_TEST_FREE_EVAS(); 873 EDJE_TEST_FREE_EVAS();
874} 874}
875END_TEST 875EFL_END_TEST
876 876
877START_TEST(edje_test_signals) 877EFL_START_TEST(edje_test_signals)
878{ 878{
879 Evas *evas; 879 Evas *evas;
880 Evas_Object *obj; 880 Evas_Object *obj;
@@ -905,7 +905,7 @@ START_TEST(edje_test_signals)
905 905
906 EDJE_TEST_FREE_EVAS(); 906 EDJE_TEST_FREE_EVAS();
907} 907}
908END_TEST 908EFL_END_TEST
909 909
910static int _signal_count; 910static int _signal_count;
911 911
@@ -917,7 +917,7 @@ _signal_callback_count_cb(void *data, Evas_Object *obj EINA_UNUSED,
917 _signal_count += *_data; 917 _signal_count += *_data;
918} 918}
919 919
920START_TEST(edje_test_signal_callback_del_full) 920EFL_START_TEST(edje_test_signal_callback_del_full)
921{ 921{
922 Evas *evas; 922 Evas *evas;
923 Evas_Object *obj; 923 Evas_Object *obj;
@@ -948,7 +948,7 @@ START_TEST(edje_test_signal_callback_del_full)
948 948
949 EDJE_TEST_FREE_EVAS(); 949 EDJE_TEST_FREE_EVAS();
950} 950}
951END_TEST 951EFL_END_TEST
952 952
953void edje_test_edje(TCase *tc) 953void edje_test_edje(TCase *tc)
954{ 954{