forked from enlightenment/efl
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
This commit is contained in:
parent
506b354842
commit
8ee3ecff95
|
@ -292,13 +292,6 @@ _unit_desc_make(void)
|
|||
}
|
||||
if (!unit_d)
|
||||
{
|
||||
Eet_Data_Descriptor *code_d = NULL;
|
||||
EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Exactness_Source_Code);
|
||||
code_d = eet_data_descriptor_stream_new(&eddc);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(code_d, Exactness_Source_Code, "language", language, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(code_d, Exactness_Source_Code, "content", content, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(code_d, Exactness_Source_Code, "command", command, EET_T_STRING);
|
||||
|
||||
EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, Exactness_Action);
|
||||
action_d = eet_data_descriptor_stream_new(&eddc);
|
||||
|
||||
|
@ -341,7 +334,6 @@ _unit_desc_make(void)
|
|||
unit_d = eet_data_descriptor_stream_new(&eddc);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(unit_d, Exactness_Unit, "actions", actions, action_d);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(unit_d, Exactness_Unit, "objs", objs, objs_d);
|
||||
EET_DATA_DESCRIPTOR_ADD_LIST(unit_d, Exactness_Unit, "codes", codes, code_d);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(unit_d, Exactness_Unit, "fonts_path", fonts_path, EET_T_STRING);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(unit_d, Exactness_Unit, "nb_shots", nb_shots, EET_T_UINT);
|
||||
}
|
||||
|
|
|
@ -244,16 +244,6 @@ typedef struct
|
|||
void *pixels; /**< Pixels of the image */
|
||||
} Exactness_Image;
|
||||
|
||||
/**
|
||||
* Description of the source code used to generate the tested application.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char *language; /**< String describing the language of the content e.g "C"...*/
|
||||
char *content; /**< Content used as source */
|
||||
char *command; /**< Command needed to generate the application from the content */
|
||||
} Exactness_Source_Code;
|
||||
|
||||
/**
|
||||
* An Exactness test unit, including the list of tested actions and produced images.
|
||||
*/
|
||||
|
@ -263,7 +253,6 @@ typedef struct
|
|||
/* imgs not in EET */
|
||||
Eina_List *imgs; /**< List of Exactness_Image */
|
||||
Eina_List *objs; /**< List of Exactness_Objects */
|
||||
Eina_List *codes; /**< List of Exactness_Source_Code */
|
||||
const char *fonts_path; /**< Path to the fonts to use, relative to the fonts dir given in parameter to the player/recorder */
|
||||
int nb_shots; /**< The number of shots present in the unit */
|
||||
} Exactness_Unit;
|
||||
|
|
|
@ -1102,42 +1102,10 @@ int main(int argc, char **argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
Eina_List *itr;
|
||||
Exactness_Source_Code *code;
|
||||
Eina_Tmpstr *f_output = NULL;
|
||||
EINA_LIST_FOREACH(_src_unit->codes, itr, code)
|
||||
{
|
||||
if (!strcmp(code->language, "C") && code->command)
|
||||
{
|
||||
int status;
|
||||
Ecore_Exe *exe;
|
||||
Eina_Tmpstr *f_code;
|
||||
Eina_Strbuf *sbuf;
|
||||
int fd_code = eina_file_mkstemp("exactness_XXXXXX.c", &f_code);
|
||||
int fd_output = eina_file_mkstemp("exactness_XXXXXX.output", &f_output);
|
||||
close(fd_output);
|
||||
write(fd_code, code->content, strlen(code->content));
|
||||
close(fd_code);
|
||||
|
||||
sbuf = eina_strbuf_new();
|
||||
eina_strbuf_append(sbuf, code->command);
|
||||
eina_strbuf_replace_all(sbuf, "$SRC", f_code);
|
||||
eina_strbuf_replace_all(sbuf, "$DEST", f_output);
|
||||
exe = ecore_exe_pipe_run(eina_strbuf_string_get(sbuf), ECORE_EXE_NONE, NULL);
|
||||
#ifdef HAVE_FORK
|
||||
waitpid(ecore_exe_pid_get(exe), &status, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (!f_output)
|
||||
{
|
||||
fprintf(stderr, "no program specified\nUse -h for more information\n");
|
||||
goto end;
|
||||
}
|
||||
argv[0] = strdup(f_output);
|
||||
fprintf(stderr, "no program specified\nUse -h for more information\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
ecore_evas_callback_new_set(_my_evas_new);
|
||||
if (_src_type != FTYPE_REMOTE)
|
||||
ecore_idler_add(_src_feed, NULL);
|
||||
|
@ -1150,7 +1118,6 @@ int main(int argc, char **argv)
|
|||
Exactness_Unit *tmp = NULL;
|
||||
if (_src_type == FTYPE_EXU) tmp = exactness_unit_file_read(_src_filename);
|
||||
_dest_unit->actions = tmp->actions;
|
||||
_dest_unit->codes = tmp->codes;
|
||||
}
|
||||
exactness_unit_file_write(_dest_unit, _dest);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue