Force scale and finger size

These two environment variables need to be forced to the standard
values to make sure scenarios are well applied.
Without this forcing, mouse clicks are not done at the right
coordinates, leading to a different behavior of the application. In
addition, shots comparison will always fail if the series of images are
based on different values of these variables.
This commit is contained in:
Daniel Zaoui 2016-03-02 12:46:26 +02:00
parent ef0b0ae89b
commit 4b2887721b
1 changed files with 9 additions and 8 deletions

View File

@ -13,17 +13,18 @@
#define RED 0xffff0000
#define WHITE 0xffffffff
#define CONFIG "ELM_SCALE=1 ELM_FINGER_SIZE=10"
static Ecore_Evas *ee = NULL;
static Evas_Object *cur_img, *orig_img, *diff_img;
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 %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 %s",
exactness_config.verbose,
exactness_config.dest_dir,
exactness_config.base_dir, ent->name,
ent->name, LIBEXACTNESS_PATH,
ent->name, LIBEXACTNESS_PATH, CONFIG,
exactness_config.wrap_command,
ent->command);
}
@ -31,11 +32,11 @@ run_test_simulation(const List_Entry *ent, char *buf)
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 %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 %s",
exactness_config.verbose,
exactness_config.dest_dir,
exactness_config.base_dir, ent->name,
ent->name, LIBEXACTNESS_PATH,
ent->name, LIBEXACTNESS_PATH, CONFIG,
exactness_config.wrap_command,
ent->command);
@ -49,11 +50,11 @@ 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 %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 %s",
exactness_config.verbose,
exactness_config.dest_dir,
exactness_config.base_dir, ent->name,
ent->name, LIBEXACTNESS_PATH,
ent->name, LIBEXACTNESS_PATH, CONFIG,
exactness_config.wrap_command,
ent->command);
}
@ -61,11 +62,11 @@ run_test_record(const List_Entry *ent, char *buf)
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 %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 %s",
exactness_config.verbose,
exactness_config.dest_dir,
exactness_config.base_dir, ent->name,
ent->name, LIBEXACTNESS_PATH,
ent->name, LIBEXACTNESS_PATH, CONFIG,
exactness_config.wrap_command,
ent->command);