Added the 'wrap' parameter, to use a wrapping command around the tests.

A good example would be valgrind.
devs/tasn/jenkins
Tom Hacohen 10 years ago
parent eac1c58b97
commit afb0cd3cd1
  1. 3
      src/bin/exactness.c
  2. 1
      src/bin/exactness_config.h
  3. 12
      src/bin/run_test.c

@ -19,6 +19,7 @@ static const Ecore_Getopt optdesc = {
{
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('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('r', "record", "Run in record mode."),
ECORE_GETOPT_STORE_TRUE('p', "play", "Run in play mode."),
@ -47,6 +48,7 @@ main(int argc, char *argv[])
Ecore_Getopt_Value values[] = {
ECORE_GETOPT_VALUE_STR(exactness_config.base_dir),
ECORE_GETOPT_VALUE_STR(exactness_config.dest_dir),
ECORE_GETOPT_VALUE_STR(exactness_config.wrap_command),
ECORE_GETOPT_VALUE_USHORT(exactness_config.jobs),
ECORE_GETOPT_VALUE_BOOL(mode_record),
ECORE_GETOPT_VALUE_BOOL(mode_play),
@ -66,6 +68,7 @@ main(int argc, char *argv[])
want_quit = EINA_FALSE;
exactness_config.base_dir = "./recordings";
exactness_config.dest_dir = "./";
exactness_config.wrap_command = "";
exactness_config.jobs = 1;
exactness_config.verbose = EINA_FALSE;

@ -10,6 +10,7 @@ struct _Exactness_Config
unsigned short jobs;
char *base_dir;
char *dest_dir;
char *wrap_command;
Eina_Bool verbose;
};

@ -15,22 +15,24 @@
void
run_test_simulation(const List_Entry *ent, char *buf)
{
snprintf(buf, SCHEDULER_CMD_SIZE, "TSUITE_VERBOSE=%d TSUITE_DEST_DIR='%s' TSUITE_FILE_NAME='%s/%s.rec' TSUITE_TEST_NAME='%s' LD_PRELOAD='%s' %s",
snprintf(buf, SCHEDULER_CMD_SIZE, "TSUITE_VERBOSE=%d TSUITE_DEST_DIR='%s' TSUITE_FILE_NAME='%s/%s.rec' TSUITE_TEST_NAME='%s' LD_PRELOAD='%s' %s %s",
exactness_config.verbose,
exactness_config.dest_dir,
exactness_config.base_dir, ent->name,
ent->name, LIBEXACTNESS_PATH,
exactness_config.wrap_command,
ent->command);
}
void
run_test_play(const List_Entry *ent, char *buf)
{
snprintf(buf, SCHEDULER_CMD_SIZE, "TSUITE_VERBOSE=%d ELM_ENGINE='buffer' TSUITE_DEST_DIR='%s/" CURRENT_SUBDIR "' TSUITE_FILE_NAME='%s/%s.rec' TSUITE_TEST_NAME='%s' LD_PRELOAD='%s' %s",
snprintf(buf, SCHEDULER_CMD_SIZE, "TSUITE_VERBOSE=%d ELM_ENGINE='buffer' TSUITE_DEST_DIR='%s/" CURRENT_SUBDIR "' TSUITE_FILE_NAME='%s/%s.rec' TSUITE_TEST_NAME='%s' LD_PRELOAD='%s' %s %s",
exactness_config.verbose,
exactness_config.dest_dir,
exactness_config.base_dir, ent->name,
ent->name, LIBEXACTNESS_PATH,
exactness_config.wrap_command,
ent->command);
run_test_prefix_rm(CURRENT_SUBDIR, ent->name);
@ -39,22 +41,24 @@ run_test_play(const List_Entry *ent, char *buf)
void
run_test_record(const List_Entry *ent, char *buf)
{
snprintf(buf, SCHEDULER_CMD_SIZE, "TSUITE_VERBOSE=%d TSUITE_RECORDING='rec' TSUITE_DEST_DIR='%s' TSUITE_FILE_NAME='%s/%s.rec' TSUITE_TEST_NAME='%s' LD_PRELOAD='%s' %s",
snprintf(buf, SCHEDULER_CMD_SIZE, "TSUITE_VERBOSE=%d TSUITE_RECORDING='rec' TSUITE_DEST_DIR='%s' TSUITE_FILE_NAME='%s/%s.rec' TSUITE_TEST_NAME='%s' LD_PRELOAD='%s' %s %s",
exactness_config.verbose,
exactness_config.dest_dir,
exactness_config.base_dir, ent->name,
ent->name, LIBEXACTNESS_PATH,
exactness_config.wrap_command,
ent->command);
}
void
run_test_init(const List_Entry *ent, char *buf)
{
snprintf(buf, SCHEDULER_CMD_SIZE, "TSUITE_VERBOSE=%d ELM_ENGINE='buffer' TSUITE_DEST_DIR='%s/" ORIG_SUBDIR "' TSUITE_FILE_NAME='%s/%s.rec' TSUITE_TEST_NAME='%s' LD_PRELOAD='%s' %s",
snprintf(buf, SCHEDULER_CMD_SIZE, "TSUITE_VERBOSE=%d ELM_ENGINE='buffer' TSUITE_DEST_DIR='%s/" ORIG_SUBDIR "' TSUITE_FILE_NAME='%s/%s.rec' TSUITE_TEST_NAME='%s' LD_PRELOAD='%s' %s %s",
exactness_config.verbose,
exactness_config.dest_dir,
exactness_config.base_dir, ent->name,
ent->name, LIBEXACTNESS_PATH,
exactness_config.wrap_command,
ent->command);
run_test_prefix_rm(ORIG_SUBDIR, ent->name);

Loading…
Cancel
Save