summaryrefslogtreecommitdiff
path: root/src/bin/exactness
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-27 14:03:07 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2020-03-31 14:56:28 +0200
commit8ee3ecff9564445fc2ef31e616a37c391b464fe6 (patch)
tree147da8d8b0c192b9a4fe320c7d63cfda3f685690 /src/bin/exactness
parent506b354842625ab0f29b12bb2791e6f587b2369a (diff)
exactness: remove code for compiling
this seems to be made for compiling binaries before testing. That sounds like a good idea, however, implementing a full buildtool in exactness is a bit hard. Hence, using meson for that would be better. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11613
Diffstat (limited to 'src/bin/exactness')
-rw-r--r--src/bin/exactness/common.c8
-rw-r--r--src/bin/exactness/common.h11
-rw-r--r--src/bin/exactness/player.c37
3 files changed, 2 insertions, 54 deletions
diff --git a/src/bin/exactness/common.c b/src/bin/exactness/common.c
index 83b972057e..d1bb1340a5 100644
--- a/src/bin/exactness/common.c
+++ b/src/bin/exactness/common.c
@@ -292,13 +292,6 @@ _unit_desc_make(void)
292 } 292 }
293 if (!unit_d) 293 if (!unit_d)
294 { 294 {
295 Eet_Data_Descriptor *code_d = NULL;
296 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Exactness_Source_Code);
297 code_d = eet_data_descriptor_stream_new(&eddc);
298 EET_DATA_DESCRIPTOR_ADD_BASIC(code_d, Exactness_Source_Code, "language", language, EET_T_STRING);
299 EET_DATA_DESCRIPTOR_ADD_BASIC(code_d, Exactness_Source_Code, "content", content, EET_T_STRING);
300 EET_DATA_DESCRIPTOR_ADD_BASIC(code_d, Exactness_Source_Code, "command", command, EET_T_STRING);
301
302 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Exactness_Action); 295 EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Exactness_Action);
303 action_d = eet_data_descriptor_stream_new(&eddc); 296 action_d = eet_data_descriptor_stream_new(&eddc);
304 297
@@ -341,7 +334,6 @@ _unit_desc_make(void)
341 unit_d = eet_data_descriptor_stream_new(&eddc); 334 unit_d = eet_data_descriptor_stream_new(&eddc);
342 EET_DATA_DESCRIPTOR_ADD_LIST(unit_d, Exactness_Unit, "actions", actions, action_d); 335 EET_DATA_DESCRIPTOR_ADD_LIST(unit_d, Exactness_Unit, "actions", actions, action_d);
343 EET_DATA_DESCRIPTOR_ADD_LIST(unit_d, Exactness_Unit, "objs", objs, objs_d); 336 EET_DATA_DESCRIPTOR_ADD_LIST(unit_d, Exactness_Unit, "objs", objs, objs_d);
344 EET_DATA_DESCRIPTOR_ADD_LIST(unit_d, Exactness_Unit, "codes", codes, code_d);
345 EET_DATA_DESCRIPTOR_ADD_BASIC(unit_d, Exactness_Unit, "fonts_path", fonts_path, EET_T_STRING); 337 EET_DATA_DESCRIPTOR_ADD_BASIC(unit_d, Exactness_Unit, "fonts_path", fonts_path, EET_T_STRING);
346 EET_DATA_DESCRIPTOR_ADD_BASIC(unit_d, Exactness_Unit, "nb_shots", nb_shots, EET_T_UINT); 338 EET_DATA_DESCRIPTOR_ADD_BASIC(unit_d, Exactness_Unit, "nb_shots", nb_shots, EET_T_UINT);
347 } 339 }
diff --git a/src/bin/exactness/common.h b/src/bin/exactness/common.h
index 27cf08b146..d931973b31 100644
--- a/src/bin/exactness/common.h
+++ b/src/bin/exactness/common.h
@@ -245,16 +245,6 @@ typedef struct
245} Exactness_Image; 245} Exactness_Image;
246 246
247/** 247/**
248 * Description of the source code used to generate the tested application.
249 */
250typedef struct
251{
252 char *language; /**< String describing the language of the content e.g "C"...*/
253 char *content; /**< Content used as source */
254 char *command; /**< Command needed to generate the application from the content */
255} Exactness_Source_Code;
256
257/**
258 * An Exactness test unit, including the list of tested actions and produced images. 248 * An Exactness test unit, including the list of tested actions and produced images.
259 */ 249 */
260typedef struct 250typedef struct
@@ -263,7 +253,6 @@ typedef struct
263 /* imgs not in EET */ 253 /* imgs not in EET */
264 Eina_List *imgs; /**< List of Exactness_Image */ 254 Eina_List *imgs; /**< List of Exactness_Image */
265 Eina_List *objs; /**< List of Exactness_Objects */ 255 Eina_List *objs; /**< List of Exactness_Objects */
266 Eina_List *codes; /**< List of Exactness_Source_Code */
267 const char *fonts_path; /**< Path to the fonts to use, relative to the fonts dir given in parameter to the player/recorder */ 256 const char *fonts_path; /**< Path to the fonts to use, relative to the fonts dir given in parameter to the player/recorder */
268 int nb_shots; /**< The number of shots present in the unit */ 257 int nb_shots; /**< The number of shots present in the unit */
269} Exactness_Unit; 258} Exactness_Unit;
diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c
index bb05f7aeb3..ea3c88f29a 100644
--- a/src/bin/exactness/player.c
+++ b/src/bin/exactness/player.c
@@ -1102,42 +1102,10 @@ int main(int argc, char **argv)
1102 } 1102 }
1103 else 1103 else
1104 { 1104 {
1105 Eina_List *itr; 1105 fprintf(stderr, "no program specified\nUse -h for more information\n");
1106 Exactness_Source_Code *code; 1106 goto end;
1107 Eina_Tmpstr *f_output = NULL;
1108 EINA_LIST_FOREACH(_src_unit->codes, itr, code)
1109 {
1110 if (!strcmp(code->language, "C") && code->command)
1111 {
1112 int status;
1113 Ecore_Exe *exe;
1114 Eina_Tmpstr *f_code;
1115 Eina_Strbuf *sbuf;
1116 int fd_code = eina_file_mkstemp("exactness_XXXXXX.c", &f_code);
1117 int fd_output = eina_file_mkstemp("exactness_XXXXXX.output", &f_output);
1118 close(fd_output);
1119 write(fd_code, code->content, strlen(code->content));
1120 close(fd_code);
1121
1122 sbuf = eina_strbuf_new();
1123 eina_strbuf_append(sbuf, code->command);
1124 eina_strbuf_replace_all(sbuf, "$SRC", f_code);
1125 eina_strbuf_replace_all(sbuf, "$DEST", f_output);
1126 exe = ecore_exe_pipe_run(eina_strbuf_string_get(sbuf), ECORE_EXE_NONE, NULL);
1127#ifdef HAVE_FORK
1128 waitpid(ecore_exe_pid_get(exe), &status, 0);
1129#endif
1130 }
1131 }
1132 if (!f_output)
1133 {
1134 fprintf(stderr, "no program specified\nUse -h for more information\n");
1135 goto end;
1136 }
1137 argv[0] = strdup(f_output);
1138 } 1107 }
1139 1108
1140
1141 ecore_evas_callback_new_set(_my_evas_new); 1109 ecore_evas_callback_new_set(_my_evas_new);
1142 if (_src_type != FTYPE_REMOTE) 1110 if (_src_type != FTYPE_REMOTE)
1143 ecore_idler_add(_src_feed, NULL); 1111 ecore_idler_add(_src_feed, NULL);
@@ -1150,7 +1118,6 @@ int main(int argc, char **argv)
1150 Exactness_Unit *tmp = NULL; 1118 Exactness_Unit *tmp = NULL;
1151 if (_src_type == FTYPE_EXU) tmp = exactness_unit_file_read(_src_filename); 1119 if (_src_type == FTYPE_EXU) tmp = exactness_unit_file_read(_src_filename);
1152 _dest_unit->actions = tmp->actions; 1120 _dest_unit->actions = tmp->actions;
1153 _dest_unit->codes = tmp->codes;
1154 } 1121 }
1155 exactness_unit_file_write(_dest_unit, _dest); 1122 exactness_unit_file_write(_dest_unit, _dest);
1156 } 1123 }