Added some verbose support (including cursor in simulation).
This commit is contained in:
parent
36fe181d8e
commit
c99fdfb239
|
@ -15,7 +15,8 @@
|
||||||
void
|
void
|
||||||
run_test_simulation(const List_Entry *ent, char *buf)
|
run_test_simulation(const List_Entry *ent, char *buf)
|
||||||
{
|
{
|
||||||
snprintf(buf, SCHEDULER_CMD_SIZE, "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",
|
||||||
|
exactness_config.verbose,
|
||||||
exactness_config.dest_dir,
|
exactness_config.dest_dir,
|
||||||
exactness_config.base_dir, ent->name,
|
exactness_config.base_dir, ent->name,
|
||||||
ent->name, LIBEXACTNESS_PATH,
|
ent->name, LIBEXACTNESS_PATH,
|
||||||
|
@ -25,7 +26,8 @@ run_test_simulation(const List_Entry *ent, char *buf)
|
||||||
void
|
void
|
||||||
run_test_play(const List_Entry *ent, char *buf)
|
run_test_play(const List_Entry *ent, char *buf)
|
||||||
{
|
{
|
||||||
snprintf(buf, SCHEDULER_CMD_SIZE, "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",
|
||||||
|
exactness_config.verbose,
|
||||||
exactness_config.dest_dir,
|
exactness_config.dest_dir,
|
||||||
exactness_config.base_dir, ent->name,
|
exactness_config.base_dir, ent->name,
|
||||||
ent->name, LIBEXACTNESS_PATH,
|
ent->name, LIBEXACTNESS_PATH,
|
||||||
|
@ -37,7 +39,8 @@ run_test_play(const List_Entry *ent, char *buf)
|
||||||
void
|
void
|
||||||
run_test_record(const List_Entry *ent, char *buf)
|
run_test_record(const List_Entry *ent, char *buf)
|
||||||
{
|
{
|
||||||
snprintf(buf, SCHEDULER_CMD_SIZE, "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",
|
||||||
|
exactness_config.verbose,
|
||||||
exactness_config.dest_dir,
|
exactness_config.dest_dir,
|
||||||
exactness_config.base_dir, ent->name,
|
exactness_config.base_dir, ent->name,
|
||||||
ent->name, LIBEXACTNESS_PATH,
|
ent->name, LIBEXACTNESS_PATH,
|
||||||
|
@ -47,7 +50,8 @@ run_test_record(const List_Entry *ent, char *buf)
|
||||||
void
|
void
|
||||||
run_test_init(const List_Entry *ent, char *buf)
|
run_test_init(const List_Entry *ent, char *buf)
|
||||||
{
|
{
|
||||||
snprintf(buf, SCHEDULER_CMD_SIZE, "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",
|
||||||
|
exactness_config.verbose,
|
||||||
exactness_config.dest_dir,
|
exactness_config.dest_dir,
|
||||||
exactness_config.base_dir, ent->name,
|
exactness_config.base_dir, ent->name,
|
||||||
ent->name, LIBEXACTNESS_PATH,
|
ent->name, LIBEXACTNESS_PATH,
|
||||||
|
|
|
@ -27,6 +27,7 @@ struct _evas_hook_setting
|
||||||
char *dest_dir;
|
char *dest_dir;
|
||||||
char *test_name;
|
char *test_name;
|
||||||
char *file_name;
|
char *file_name;
|
||||||
|
Eina_Bool verbose;
|
||||||
};
|
};
|
||||||
typedef struct _evas_hook_setting evas_hook_setting;
|
typedef struct _evas_hook_setting evas_hook_setting;
|
||||||
|
|
||||||
|
@ -36,6 +37,18 @@ static evas_hook_setting *_hook_setting = NULL;
|
||||||
static Tsuite_Data ts;
|
static Tsuite_Data ts;
|
||||||
static Eina_List *evas_list = NULL; /* List of Evas pointers */
|
static Eina_List *evas_list = NULL; /* List of Evas pointers */
|
||||||
|
|
||||||
|
static void
|
||||||
|
_tsuite_verbosef(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
if (!_hook_setting->verbose)
|
||||||
|
return;
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
|
vprintf(fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*
|
*
|
||||||
|
@ -210,11 +223,15 @@ ecore_init(void)
|
||||||
|
|
||||||
if (!_hook_setting)
|
if (!_hook_setting)
|
||||||
{
|
{
|
||||||
|
const char *tmp;
|
||||||
_hook_setting = calloc(1, sizeof(evas_hook_setting));
|
_hook_setting = calloc(1, sizeof(evas_hook_setting));
|
||||||
_hook_setting->recording = getenv("TSUITE_RECORDING");
|
_hook_setting->recording = getenv("TSUITE_RECORDING");
|
||||||
_hook_setting->dest_dir = getenv("TSUITE_DEST_DIR");
|
_hook_setting->dest_dir = getenv("TSUITE_DEST_DIR");
|
||||||
_hook_setting->test_name = getenv("TSUITE_TEST_NAME");
|
_hook_setting->test_name = getenv("TSUITE_TEST_NAME");
|
||||||
_hook_setting->file_name = getenv("TSUITE_FILE_NAME");
|
_hook_setting->file_name = getenv("TSUITE_FILE_NAME");
|
||||||
|
tmp = getenv("TSUITE_VERBOSE");
|
||||||
|
if (tmp)
|
||||||
|
_hook_setting->verbose = atoi(tmp);
|
||||||
#ifdef DEBUG_TSUITE
|
#ifdef DEBUG_TSUITE
|
||||||
printf("<%s> test_name=<%s>\n", __func__, _hook_setting->test_name);
|
printf("<%s> test_name=<%s>\n", __func__, _hook_setting->test_name);
|
||||||
printf("<%s> dest_dir=<%s>\n", __func__, _hook_setting->dest_dir);
|
printf("<%s> dest_dir=<%s>\n", __func__, _hook_setting->dest_dir);
|
||||||
|
@ -291,6 +308,19 @@ tsuite_feed_event(void *data)
|
||||||
time_t evt_time;
|
time_t evt_time;
|
||||||
if (!td)
|
if (!td)
|
||||||
return ECORE_CALLBACK_CANCEL;
|
return ECORE_CALLBACK_CANCEL;
|
||||||
|
static Evas_Object *rect = NULL;
|
||||||
|
if (_hook_setting->verbose)
|
||||||
|
{
|
||||||
|
if (!rect)
|
||||||
|
{
|
||||||
|
rect = evas_object_rectangle_add(eina_list_data_get(evas_list));
|
||||||
|
evas_object_repeat_events_set(rect, EINA_TRUE);
|
||||||
|
evas_object_color_set(rect, 255, 0, 0, 255);
|
||||||
|
evas_object_resize(rect, 15, 15);
|
||||||
|
evas_object_layer_set(rect, 100);
|
||||||
|
evas_object_show(rect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Variant_st *v = eina_list_data_get(td->current_event);
|
Variant_st *v = eina_list_data_get(td->current_event);
|
||||||
switch(tsuite_event_mapping_type_get(v->t.type))
|
switch(tsuite_event_mapping_type_get(v->t.type))
|
||||||
|
@ -299,6 +329,7 @@ tsuite_feed_event(void *data)
|
||||||
{
|
{
|
||||||
mouse_in_mouse_out *t = v->data;
|
mouse_in_mouse_out *t = v->data;
|
||||||
evt_time = t->timestamp;
|
evt_time = t->timestamp;
|
||||||
|
_tsuite_verbosef("Mouse in\n");
|
||||||
#ifdef DEBUG_TSUITE
|
#ifdef DEBUG_TSUITE
|
||||||
printf("%s evas_event_feed_mouse_in timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp, t->n_evas);
|
printf("%s evas_event_feed_mouse_in timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp, t->n_evas);
|
||||||
#endif
|
#endif
|
||||||
|
@ -310,6 +341,7 @@ tsuite_feed_event(void *data)
|
||||||
{
|
{
|
||||||
mouse_in_mouse_out *t = v->data;
|
mouse_in_mouse_out *t = v->data;
|
||||||
evt_time = t->timestamp;
|
evt_time = t->timestamp;
|
||||||
|
_tsuite_verbosef("Mouse out\n");
|
||||||
#ifdef DEBUG_TSUITE
|
#ifdef DEBUG_TSUITE
|
||||||
printf("%s evas_event_feed_mouse_out timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp,t->n_evas);
|
printf("%s evas_event_feed_mouse_out timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp,t->n_evas);
|
||||||
#endif
|
#endif
|
||||||
|
@ -321,6 +353,7 @@ tsuite_feed_event(void *data)
|
||||||
{
|
{
|
||||||
mouse_down_mouse_up *t = v->data;
|
mouse_down_mouse_up *t = v->data;
|
||||||
evt_time = t->timestamp;
|
evt_time = t->timestamp;
|
||||||
|
_tsuite_verbosef("Mouse down\n");
|
||||||
#ifdef DEBUG_TSUITE
|
#ifdef DEBUG_TSUITE
|
||||||
printf("%s evas_event_feed_mouse_down timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp, t->n_evas);
|
printf("%s evas_event_feed_mouse_down timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp, t->n_evas);
|
||||||
#endif
|
#endif
|
||||||
|
@ -334,6 +367,7 @@ tsuite_feed_event(void *data)
|
||||||
{
|
{
|
||||||
mouse_down_mouse_up *t = v->data;
|
mouse_down_mouse_up *t = v->data;
|
||||||
evt_time = t->timestamp;
|
evt_time = t->timestamp;
|
||||||
|
_tsuite_verbosef("Mouse up\n");
|
||||||
#ifdef DEBUG_TSUITE
|
#ifdef DEBUG_TSUITE
|
||||||
printf("%s evas_event_feed_mouse_up timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp,t->n_evas);
|
printf("%s evas_event_feed_mouse_up timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp,t->n_evas);
|
||||||
#endif
|
#endif
|
||||||
|
@ -352,12 +386,18 @@ tsuite_feed_event(void *data)
|
||||||
#endif
|
#endif
|
||||||
evas_event_feed_mouse_move(eina_list_nth(evas_list, t->n_evas),
|
evas_event_feed_mouse_move(eina_list_nth(evas_list, t->n_evas),
|
||||||
t->x, t->y, time(NULL), NULL);
|
t->x, t->y, time(NULL), NULL);
|
||||||
|
|
||||||
|
if (rect)
|
||||||
|
{
|
||||||
|
evas_object_move(rect, t->x, t->y);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TSUITE_EVENT_MOUSE_WHEEL:
|
case TSUITE_EVENT_MOUSE_WHEEL:
|
||||||
{
|
{
|
||||||
mouse_wheel *t = v->data;
|
mouse_wheel *t = v->data;
|
||||||
evt_time = t->timestamp;
|
evt_time = t->timestamp;
|
||||||
|
_tsuite_verbosef("Mouse wheel\n");
|
||||||
#ifdef DEBUG_TSUITE
|
#ifdef DEBUG_TSUITE
|
||||||
printf("%s evas_event_feed_mouse_wheel timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp, t->n_evas);
|
printf("%s evas_event_feed_mouse_wheel timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp, t->n_evas);
|
||||||
#endif
|
#endif
|
||||||
|
@ -439,6 +479,7 @@ tsuite_feed_event(void *data)
|
||||||
{
|
{
|
||||||
take_screenshot *t = v->data;
|
take_screenshot *t = v->data;
|
||||||
evt_time = t->timestamp;
|
evt_time = t->timestamp;
|
||||||
|
_tsuite_verbosef("Shot taken.\n");
|
||||||
#ifdef DEBUG_TSUITE
|
#ifdef DEBUG_TSUITE
|
||||||
printf("%s take shot timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp, t->n_evas);
|
printf("%s take shot timestamp=<%u> t->n_evas=<%d>\n", __func__, t->timestamp, t->n_evas);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue