summaryrefslogtreecommitdiff
path: root/src/tests/elementary/elm_suite.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-03-23 12:56:14 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-03-23 13:24:41 -0700
commitc2a1c49ab2042f559b28e840e54feb8494888e0e (patch)
treec6eb110b7c479499854eede9d0c3ab0a80c9a11a /src/tests/elementary/elm_suite.c
parent9340855597e7e465435c69b6278650346688da14 (diff)
elementary: move all legacy files to their expected new location.
Diffstat (limited to 'src/tests/elementary/elm_suite.c')
-rw-r--r--src/tests/elementary/elm_suite.c123
1 files changed, 123 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_suite.c b/src/tests/elementary/elm_suite.c
new file mode 100644
index 0000000..bb9625f
--- /dev/null
+++ b/src/tests/elementary/elm_suite.c
@@ -0,0 +1,123 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#include <Elementary.h>
6#include "elm_suite.h"
7
8typedef struct _Elementary_Test_Case Elementary_Test_Case;
9
10struct _Elementary_Test_Case
11{
12 const char *test_case;
13 void (*build)(TCase *tc);
14};
15
16static const Elementary_Test_Case etc[] = {
17 { "Elementary", elm_test_init },
18 { "elm_check", elm_test_check },
19 { "elm_colorselector", elm_test_colorselector },
20 { "elm_entry", elm_test_entry},
21 { "elm_atspi", elm_test_atspi},
22 { "elm_button", elm_test_button},
23 { "elm_image", elm_test_image},
24 { "elm_list", elm_test_list},
25 { "elm_photo", elm_test_photo},
26 { "elm_actionslider", elm_test_actionslider},
27 { "elm_box", elm_test_box},
28 { "elm_table", elm_test_table},
29 { "elm_thumb", elm_test_thumb},
30 { "elm_menu", elm_test_menu},
31 { "elm_photocam", elm_test_photocam},
32 { "elm_win", elm_test_win},
33 { "elm_icon", elm_test_icon},
34 { "elm_prefs", elm_test_prefs},
35 { "elm_map", elm_test_map},
36 { "elm_glview", elm_test_glview},
37 { "elm_web", elm_test_web},
38 { "elm_toolbar", elm_test_toolbar},
39 { "elm_grid", elm_test_grid},
40 { "elm_diskselector", elm_test_diskselector},
41 { "elm_notify", elm_test_notify},
42 { "elm_mapbuf", elm_test_mapbuf},
43 { "elm_flip", elm_test_flip},
44 { "elm_layout", elm_test_layout},
45 { "elm_slider", elm_test_slider},
46 { "elm_ctxpopup", elm_test_ctxpopup},
47 { "elm_separator", elm_test_separator},
48 { "elm_calendar", elm_test_calendar},
49 { "elm_inwin", elm_test_inwin},
50 { "elm_gengrid", elm_test_gengrid},
51 { "elm_radio", elm_test_radio},
52 { "elm_scroller", elm_test_scroller},
53 { "elm_frame", elm_test_frame},
54 { "elm_datetime", elm_test_datetime},
55 { "elm_player", elm_test_player},
56 { "elm_bg", elm_test_bg},
57 { "elm_video", elm_test_video},
58 { "elm_segmentcontrol", elm_test_segmentcontrol},
59 { "elm_progressbar", elm_test_progressbar},
60 { "elm_fileselector", elm_test_fileselector},
61 { "elm_fileselector_button", elm_test_fileselector_button},
62 { "elm_fileselector_entry", elm_test_fileselector_entry},
63 { "elm_hoversel", elm_test_hoversel},
64 { "elm_multibuttonentry", elm_test_multibuttonentry},
65 { "elm_naviframe", elm_test_naviframe},
66 { "elm_popup", elm_test_popup},
67 { "elm_bubble", elm_test_bubble},
68 { "elm_clock", elm_test_clock},
69 { "elm_conformant", elm_test_conformant},
70 { "elm_dayselector", elm_test_dayselector},
71 { "elm_flipselector", elm_test_flipselector},
72 { "elm_genlist", elm_test_genlist},
73 { "elm_hover", elm_test_hover},
74 { "elm_index", elm_test_index},
75 { "elm_label", elm_test_label},
76 { "elm_panel", elm_test_panel},
77 { "elm_panes", elm_test_panes},
78 { "elm_slideshow", elm_test_slideshow},
79 { "elm_spinner", elm_test_spinner},
80 { "elm_plug", elm_test_plug},
81 { NULL, NULL }
82};
83
84Suite *
85elm_suite()
86{
87 TCase *tc;
88 Suite *s;
89 int i;
90
91 s = suite_create("Elementary");
92
93 for (i = 0; etc[i].test_case; ++i)
94 {
95 tc = tcase_create(etc[i].test_case);
96 etc[i].build(tc);
97 suite_add_tcase(s, tc);
98 tcase_set_timeout(tc, 0);
99 }
100
101 return s;
102}
103
104int
105main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
106{
107 int failed_count;
108 Suite *s;
109 SRunner *sr;
110
111 putenv("ELM_RUN_IN_TREE=1");
112
113 s = elm_suite();
114 sr = srunner_create(s);
115
116 srunner_set_xml(sr, TESTS_BUILD_DIR "/check-results.xml");
117
118 srunner_run_all(sr, CK_ENV);
119 failed_count = srunner_ntests_failed(sr);
120 srunner_free(sr);
121
122 return (failed_count == 0) ? 0 : 255;
123}