Replace preload invocation with exactness_play

This commit is contained in:
Daniel Zaoui 2018-01-07 22:58:38 +02:00
parent e4ac42a7b1
commit 3bcd6bb4de
1 changed files with 14 additions and 28 deletions

View File

@ -14,8 +14,6 @@
#define BUF_SIZE 1024
#define CONFIG "ELM_SCALE=1 ELM_FINGER_SIZE=10"
typedef struct
{
EINA_INLIST;
@ -56,35 +54,23 @@ _printf(int verbose, const char *fmt, ...)
va_end(ap);
}
#define CONFIG "ELM_SCALE=1 ELM_FINGER_SIZE=10"
static void
_run_command_prepare(const List_Entry *ent, char *buf)
{
Eina_Strbuf *sbuf = eina_strbuf_new();
eina_strbuf_append_printf(sbuf, "TSUITE_VERBOSE=%d ", _verbose);
eina_strbuf_append_printf(sbuf, "TSUITE_FILE_NAME='%s/%s.rec' ",
_base_dir, ent->name);
eina_strbuf_append_printf(sbuf, "TSUITE_TEST_NAME='%s' ", ent->name);
switch (_mode)
{
case RUN_PLAY:
{
eina_strbuf_append(sbuf, "ELM_ENGINE='buffer' ");
eina_strbuf_append_printf(sbuf, "TSUITE_DEST_DIR='%s/%s' ",
_dest_dir, CURRENT_SUBDIR);
break;
}
case RUN_INIT:
{
eina_strbuf_append(sbuf, "ELM_ENGINE='buffer' ");
eina_strbuf_append_printf(sbuf, "TSUITE_DEST_DIR='%s/%s' ",
_dest_dir, ORIG_SUBDIR);
break;
}
default: break;
}
eina_strbuf_append_printf(sbuf, "LD_PRELOAD='%s/exactness/libexactness_%s.so' %s %s %s",
PACKAGE_LIBDIR, "player",
CONFIG, _wrap_command, ent->command);
eina_strbuf_append_printf(sbuf,
"%s %s exactness_play %s %s%.*s -t '%s/%s.rec' ",
CONFIG, _wrap_command ? _wrap_command : "",
_mode == RUN_SIMULATION ? "-s" : "",
_verbose ? "-" : "", _verbose, "vvvvvvvvvv",
_base_dir, ent->name
);
if (_mode == RUN_PLAY)
eina_strbuf_append_printf(sbuf, "-o '%s/%s' ", _dest_dir, CURRENT_SUBDIR);
if (_mode == RUN_INIT)
eina_strbuf_append_printf(sbuf, "-o '%s/%s' ", _dest_dir, ORIG_SUBDIR);
eina_strbuf_append(sbuf, ent->command);
strncpy(buf, eina_strbuf_string_get(sbuf), SCHEDULER_CMD_SIZE-1);
eina_strbuf_free(sbuf);
_printf(1, "Command: %s\n", buf);
@ -369,7 +355,7 @@ static const Ecore_Getopt optdesc = {
0,
{
ECORE_GETOPT_STORE_STR('b', "base-dir", "The location of the rec files."),
ECORE_GETOPT_STORE_STR('d', "dest-dir", "The location of the images."),
ECORE_GETOPT_STORE_STR('o', "output", "The location of the images."),
ECORE_GETOPT_STORE_STR('w', "wrap", "Use a custom command to launch the tests (e.g valgrind)."),
ECORE_GETOPT_STORE_USHORT('j', "jobs", "The number of jobs to run in parallel."),
ECORE_GETOPT_STORE_TRUE('p', "play", "Run in play mode."),