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 BUF_SIZE 1024
#define CONFIG "ELM_SCALE=1 ELM_FINGER_SIZE=10"
typedef struct typedef struct
{ {
EINA_INLIST; EINA_INLIST;
@ -56,35 +54,23 @@ _printf(int verbose, const char *fmt, ...)
va_end(ap); va_end(ap);
} }
#define CONFIG "ELM_SCALE=1 ELM_FINGER_SIZE=10"
static void static void
_run_command_prepare(const List_Entry *ent, char *buf) _run_command_prepare(const List_Entry *ent, char *buf)
{ {
Eina_Strbuf *sbuf = eina_strbuf_new(); Eina_Strbuf *sbuf = eina_strbuf_new();
eina_strbuf_append_printf(sbuf, "TSUITE_VERBOSE=%d ", _verbose); eina_strbuf_append_printf(sbuf,
eina_strbuf_append_printf(sbuf, "TSUITE_FILE_NAME='%s/%s.rec' ", "%s %s exactness_play %s %s%.*s -t '%s/%s.rec' ",
_base_dir, ent->name); CONFIG, _wrap_command ? _wrap_command : "",
eina_strbuf_append_printf(sbuf, "TSUITE_TEST_NAME='%s' ", ent->name); _mode == RUN_SIMULATION ? "-s" : "",
switch (_mode) _verbose ? "-" : "", _verbose, "vvvvvvvvvv",
{ _base_dir, ent->name
case RUN_PLAY: );
{ if (_mode == RUN_PLAY)
eina_strbuf_append(sbuf, "ELM_ENGINE='buffer' "); eina_strbuf_append_printf(sbuf, "-o '%s/%s' ", _dest_dir, CURRENT_SUBDIR);
eina_strbuf_append_printf(sbuf, "TSUITE_DEST_DIR='%s/%s' ", if (_mode == RUN_INIT)
_dest_dir, CURRENT_SUBDIR); eina_strbuf_append_printf(sbuf, "-o '%s/%s' ", _dest_dir, ORIG_SUBDIR);
break; eina_strbuf_append(sbuf, ent->command);
}
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);
strncpy(buf, eina_strbuf_string_get(sbuf), SCHEDULER_CMD_SIZE-1); strncpy(buf, eina_strbuf_string_get(sbuf), SCHEDULER_CMD_SIZE-1);
eina_strbuf_free(sbuf); eina_strbuf_free(sbuf);
_printf(1, "Command: %s\n", buf); _printf(1, "Command: %s\n", buf);
@ -369,7 +355,7 @@ static const Ecore_Getopt optdesc = {
0, 0,
{ {
ECORE_GETOPT_STORE_STR('b', "base-dir", "The location of the rec files."), 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_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_USHORT('j', "jobs", "The number of jobs to run in parallel."),
ECORE_GETOPT_STORE_TRUE('p', "play", "Run in play mode."), ECORE_GETOPT_STORE_TRUE('p', "play", "Run in play mode."),