diff options
author | Nakamura Hayato <hayato.nakamura@mail.toyota-td.jp> | 2013-08-30 20:21:41 +0900 |
---|---|---|
committer | Nakamura Hayato <hayato.nakamura@mail.toyota-td.jp> | 2013-08-30 20:59:12 +0900 |
commit | c0ddb023649b0d9d58e36f022cf5eef374aadde4 (patch) | |
tree | ed61d09bac6507d69bfd9b1789a33a73a4d3b50f /tests | |
parent | d445c3e4277a10f4ad3239236c3f6c7bb074719d (diff) | |
download | ico-uxf-weston-plugin-c0ddb023649b0d9d58e36f022cf5eef374aadde4.tar.gz ico-uxf-weston-plugin-c0ddb023649b0d9d58e36f022cf5eef374aadde4.tar.bz2 ico-uxf-weston-plugin-c0ddb023649b0d9d58e36f022cf5eef374aadde4.zip |
The change of the configuration and the implementation of the event input.
Change-Id: Ic38eaff32bba49a264ac224ed9e5c2407b6d202a
Signed-off-by: Nakamura Hayato <hayato.nakamura@mail.toyota-td.jp>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-client.c | 63 | ||||
-rw-r--r-- | tests/test-homescreen.c | 193 | ||||
-rw-r--r-- | tests/testdata/cl_surface2.dat | 2 | ||||
-rw-r--r-- | tests/testdata/cl_surface4.dat | 2 | ||||
-rw-r--r-- | tests/testdata/hs_animatest_all.dat | 67 | ||||
-rw-r--r-- | tests/testdata/hs_mapsurf.dat | 1 | ||||
-rw-r--r-- | tests/testdata/hs_sendinput.dat | 229 | ||||
-rwxr-xr-x | tests/weston-plugin-test.send_input (renamed from tests/weston-plugin-vbox) | 11 | ||||
-rw-r--r-- | tests/weston.ini | 16 | ||||
-rw-r--r-- | tests/weston.ini.fullhd | 64 |
10 files changed, 495 insertions, 153 deletions
diff --git a/tests/test-client.c b/tests/test-client.c index 2532674..3720301 100644 --- a/tests/test-client.c +++ b/tests/test-client.c @@ -62,6 +62,7 @@ struct input { struct wl_seat *seat; struct wl_pointer *pointer; struct wl_keyboard *keyboard; + struct wl_touch *touch; float x, y; uint32_t button_mask; struct surface *pointer_focus; @@ -99,8 +100,8 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer, input->pointer_focus = wl_surface_get_user_data(surface); input->x = wl_fixed_to_double(x); input->y = wl_fixed_to_double(y); - print_log("CLIENT: got pointer enter (%d,%d), surface %p", - (int)input->x, (int)input->y, surface); + print_log("CLIENT: got pointer enter (%d,%d)=(%d,%d), surface %p", + x, y, (int)input->x, (int)input->y, surface); } static void @@ -123,7 +124,8 @@ pointer_handle_motion(void *data, struct wl_pointer *pointer, input->x = wl_fixed_to_double(x); input->y = wl_fixed_to_double(y); - print_log("CLIENT: got pointer motion (%d,%d)", (int)input->x, (int)input->y); + print_log("CLIENT: got pointer motion (%d,%d)=(%d,%d)", + x, y, (int)input->x, (int)input->y); } static void @@ -197,6 +199,39 @@ keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, print_log("CLIENT: got keyboard modifier"); } +static void +touch_handle_down(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time, + struct wl_surface *surface, int32_t id, wl_fixed_t x, wl_fixed_t y) +{ + print_log("CLIENT: got touch down %d (%d,%d)", id, x/256, y/256); +} + +static void +touch_handle_up(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time, + int32_t id) +{ + print_log("CLIENT: got touch up %d", id); +} + +static void +touch_handle_motion(void *data, struct wl_touch *wl_touch, uint32_t time, + int32_t id, wl_fixed_t x, wl_fixed_t y) +{ + print_log("CLIENT: got touch motion %d (%d,%d)", id, x/256, y/256); +} + +static void +touch_handle_frame(void *data, struct wl_touch *wl_touch) +{ + print_log("CLIENT: got touch frame"); +} + +static void +touch_handle_cancel(void *data, struct wl_touch *wl_touch) +{ + print_log("CLIENT: got touch cancel"); +} + static const struct wl_pointer_listener pointer_listener = { pointer_handle_enter, pointer_handle_leave, @@ -213,6 +248,14 @@ static const struct wl_keyboard_listener keyboard_listener = { keyboard_handle_modifiers, }; +static const struct wl_touch_listener touch_listener = { + touch_handle_down, + touch_handle_up, + touch_handle_motion, + touch_handle_frame, + touch_handle_cancel +}; + static void seat_handle_capabilities(void *data, struct wl_seat *seat, enum wl_seat_capability caps) @@ -238,6 +281,16 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, wl_keyboard_destroy(input->keyboard); input->keyboard = NULL; } + + if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !input->touch) { + input->touch = wl_seat_get_touch(seat); + wl_touch_set_user_data(input->touch, input); + wl_touch_add_listener(input->touch, &touch_listener, input); + } + else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && input->touch) { + wl_touch_destroy(input->touch); + input->touch = NULL; + } } static const struct wl_seat_listener seat_listener = { @@ -586,9 +639,9 @@ int main(int argc, char *argv[]) while (1) { sleep_with_wayland(display->display, 20); if (display->prompt) { - printf("CLIENT: "); fflush(stdout); + printf("CLIENT> "); fflush(stdout); } - ret = getdata(display->ico_window_mgr, "CLIENT: ", fd, buf, sizeof(buf)); + ret = getdata(display->ico_window_mgr, "CLIENT> ", fd, buf, sizeof(buf)); if (ret < 0) { fprintf(stderr, "CLIENT: read error: fd %d, %m\n", fd); diff --git a/tests/test-homescreen.c b/tests/test-homescreen.c index 265a481..02b4366 100644 --- a/tests/test-homescreen.c +++ b/tests/test-homescreen.c @@ -102,6 +102,7 @@ struct input { struct wl_seat *seat; struct wl_pointer *pointer; struct wl_keyboard *keyboard; + struct wl_touch *touch; float x, y; uint32_t button_mask; struct surface *pointer_focus; @@ -237,6 +238,39 @@ keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, print_log("HOMESCREEN: got keyboard modifier"); } +static void +touch_handle_down(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time, + struct wl_surface *surface, int32_t id, wl_fixed_t x, wl_fixed_t y) +{ + print_log("CLIENT: got touch down %d (%d,%d)", id, x/256, y/256); +} + +static void +touch_handle_up(void *data, struct wl_touch *wl_touch, uint32_t serial, uint32_t time, + int32_t id) +{ + print_log("CLIENT: got touch up %d", id); +} + +static void +touch_handle_motion(void *data, struct wl_touch *wl_touch, uint32_t time, + int32_t id, wl_fixed_t x, wl_fixed_t y) +{ + print_log("CLIENT: got touch motion %d (%d,%d)", id, x/256, y/256); +} + +static void +touch_handle_frame(void *data, struct wl_touch *wl_touch) +{ + print_log("CLIENT: got touch frame"); +} + +static void +touch_handle_cancel(void *data, struct wl_touch *wl_touch) +{ + print_log("CLIENT: got touch cancel"); +} + static const struct wl_pointer_listener pointer_listener = { pointer_handle_enter, pointer_handle_leave, @@ -253,6 +287,14 @@ static const struct wl_keyboard_listener keyboard_listener = { keyboard_handle_modifiers, }; +static const struct wl_touch_listener touch_listener = { + touch_handle_down, + touch_handle_up, + touch_handle_motion, + touch_handle_frame, + touch_handle_cancel +}; + static void seat_handle_capabilities(void *data, struct wl_seat *seat, enum wl_seat_capability caps) @@ -278,6 +320,16 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, wl_keyboard_destroy(input->keyboard); input->keyboard = NULL; } + + if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !input->touch) { + input->touch = wl_seat_get_touch(seat); + wl_touch_set_user_data(input->touch, input); + wl_touch_add_listener(input->touch, &touch_listener, input); + } + else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && input->touch) { + wl_touch_destroy(input->touch); + input->touch = NULL; + } } static const struct wl_seat_listener seat_listener = { @@ -624,6 +676,10 @@ window_active(void *data, struct ico_window_mgr *ico_window_mgr, { print_log("HOMESCREEN: Event[window_active] surface=%08x acive=%d", (int)surfaceid, (int)active); + if ((surfaceid & 0x0000ffff) == 0x0001) { + ico_window_mgr_set_visible(ico_window_mgr, surfaceid, + ICO_WINDOW_MGR_V_NOCHANGE, 0, 0); + } } static void @@ -733,7 +789,7 @@ handle_global(void *data, struct wl_registry *registry, uint32_t id, output->output = wl_registry_bind(display->registry, id, &wl_output_interface, 1); wl_output_add_listener(output->output, &output_listener, output); display->output[display->num_output] = output; - + print_log("HOMESCREEN: created output[%d] global %p", display->num_output, display->output[display->num_output]); display->num_output ++; @@ -1189,6 +1245,37 @@ raise_surface(struct display *display, char *buf, const int raise) } static void +active_window(struct display *display, char *buf) +{ + char *args[10]; + int narg; + int surfaceid; + int target; + + narg = pars_command(buf, args, 10); + if (narg >= 1) { + surfaceid = search_surface(display, args[0]); + if (narg >= 2) { + target = strtol(args[1], (char **)0, 0); + } + else { + target = ICO_WINDOW_MGR_ACTIVE_POINTER | ICO_WINDOW_MGR_ACTIVE_KEYBOARD; + } + if (surfaceid >= 0) { + print_log("HOMESCREEN: active(%s,%08x,target=%x)", args[0], surfaceid, target); + ico_window_mgr_set_active(display->ico_window_mgr, surfaceid, target); + } + else { + print_log("HOMESCREEN: Unknown surface(%s) at active command", args[0]); + } + } + else { + print_log("HOMESCREEN: active command[active appid[target]] has no argument"); + } +} + + +static void animation_surface(struct display *display, char *buf) { char *args[10]; @@ -1349,6 +1436,98 @@ input_del(struct display *display, char *buf) } static void +input_send(struct display *display, char *buf) +{ + char *args[10]; + int narg; + int surfaceid; + int type; + int no; + int code; + int value; + char appid[64]; + + narg = pars_command(buf, args, 10); + if (narg >= 5) { + memset(appid, 0, sizeof(appid)); + if (args[0][0] == '@') { + strncpy(appid, &args[0][1], sizeof(appid)-1); + surfaceid = 0; + } + else { + surfaceid = search_surface(display, args[0]); + } + if (strcasecmp(args[1], "POINTER") == 0) { + type = ICO_INPUT_MGR_DEVICE_TYPE_POINTER; + } + else if (strcasecmp(args[1], "KEYBOARD") == 0) { + type = ICO_INPUT_MGR_DEVICE_TYPE_KEYBOARD; + } + else if (strcasecmp(args[1], "TOUCH") == 0) { + type = ICO_INPUT_MGR_DEVICE_TYPE_TOUCH; + } + else if (strcasecmp(args[1], "SWITCH") == 0) { + type = ICO_INPUT_MGR_DEVICE_TYPE_SWITCH; + } + else if (strcasecmp(args[1], "HAPTIC") == 0) { + type = ICO_INPUT_MGR_DEVICE_TYPE_HAPTIC; + } + else { + type = strtol(args[1], (char **)0, 0); + } + no = strtol(args[2], (char **)0, 0); + if (strcasecmp(args[3], "ABS_X") == 0) { + code = ABS_X; + } + else if (strcasecmp(args[3], "ABS_Y") == 0) { + code = ABS_Y; + } + else if (strcasecmp(args[3], "ABS_Z") == 0) { + code = ABS_Z; + } + else if (strcasecmp(args[3], "REL_X") == 0) { + code = REL_X | (EV_REL << 16); + } + else if (strcasecmp(args[3], "REL_Y") == 0) { + code = REL_Y | (EV_REL << 16); + } + else if (strcasecmp(args[3], "REL_Z") == 0) { + code = REL_Z | (EV_REL << 16); + } + else if (strcasecmp(args[3], "BTN_TOUCH") == 0) { + code = BTN_TOUCH; + } + else if (strcasecmp(args[3], "BTN_LEFT") == 0) { + code = BTN_LEFT; + } + else if (strcasecmp(args[3], "BTN_RIGHT") == 0) { + code = BTN_RIGHT; + } + else if (strcasecmp(args[3], "BTN_MIDDLE") == 0) { + code = BTN_MIDDLE; + } + else if (strcasecmp(args[3], "BTN_RIGHT") == 0) { + code = BTN_RIGHT; + } + else { + code = strtol(args[3], (char **)0, 0); + } + value = strtol(args[4], (char **)0, 0); + if (narg >= 6) { + value = (value << 16) + strtol(args[5], (char **)0, 0); + } + print_log("HOMESCREEN: input_send(%s.%x,%d,%d,%x,%d)", + appid, surfaceid, type, no, code, value); + ico_input_mgr_control_send_input_event(display->ico_input_mgr, + appid, surfaceid, type, no, code, value); + } + else { + print_log("HOMESCREEN: input_send command[input_send {@app/serface} type no code " + "value [value2]] has no argument"); + } +} + +static void input_conf(struct display *display, char *buf) { char *args[10]; @@ -1623,9 +1802,9 @@ int main(int argc, char *argv[]) while (1) { sleep_with_wayland(display->display, 20); if (display->prompt) { - printf("HOMESCREEN: "); fflush(stdout); + printf("HOMESCREEN> "); fflush(stdout); } - ret = getdata(display->ico_window_mgr, "HOMESCREEN: ", fd, buf, sizeof(buf)); + ret = getdata(display->ico_window_mgr, "HOMESCREEN> ", fd, buf, sizeof(buf)); if (ret < 0) { fprintf(stderr, "HOMESCREEN: read error: fd %d, %m\n", fd); return -1; @@ -1687,6 +1866,10 @@ int main(int argc, char *argv[]) /* Raise/Lower surface window */ raise_surface(display, &buf[5], 0); } + else if (strncasecmp(buf, "active", 6) == 0) { + /* Active surface window */ + active_window(display, &buf[6]); + } else if (strncasecmp(buf, "animation", 9) == 0) { /* Set animation surface window */ animation_surface(display, &buf[9]); @@ -1707,6 +1890,10 @@ int main(int argc, char *argv[]) /* Reset input switch to application*/ input_del(display, &buf[9]); } + else if (strncasecmp(buf, "input_send", 10) == 0) { + /* Input event send to application*/ + input_send(display, &buf[10]); + } else if (strncasecmp(buf, "input_conf", 10) == 0) { /* input switch configuration */ input_conf(display, &buf[10]); diff --git a/tests/testdata/cl_surface2.dat b/tests/testdata/cl_surface2.dat index 68b40f8..c642759 100644 --- a/tests/testdata/cl_surface2.dat +++ b/tests/testdata/cl_surface2.dat @@ -3,7 +3,7 @@ # # 1. Create Surface create-surface -# 2. Sleep 10 sec +# 2. Sleep 8 sec sleep 8 # 3. End of this Application (exit) bye diff --git a/tests/testdata/cl_surface4.dat b/tests/testdata/cl_surface4.dat index 62ff39e..9d27d43 100644 --- a/tests/testdata/cl_surface4.dat +++ b/tests/testdata/cl_surface4.dat @@ -6,6 +6,6 @@ create-surface # 2. Sleep 2 sec with color change sleep 0.1 clear-surface 0x80ff4060 -sleep 35 +sleep 60 # 3. End of this Application (exit) bye diff --git a/tests/testdata/hs_animatest_all.dat b/tests/testdata/hs_animatest_all.dat deleted file mode 100644 index df84c97..0000000 --- a/tests/testdata/hs_animatest_all.dat +++ /dev/null @@ -1,67 +0,0 @@ -# Test for Weston IVI Plugin for HomeScreen(SystemController) -# Animation Test -# -# 1. Surface animation -launch ../tests/test-client < ../tests/testdata/cl_surface4.dat 2> ../tests/testlog/test-client04.log -waitcreate 2 -resize test-client 200 300 -move test-client 300 400 0 -# -# fade and show/hide -animation test-client fade 400 -show test-client 1 -sleep 1 -hide test-client 1 -sleep 2 -# -# slide.toleft and show/hide -animation test-client slide.toleft 400 -show test-client 1 -sleep 1 -hide test-client 1 -sleep 2 -# -# slide.toright and show/hide -animation test-client slide.toright 400 -show test-client 1 -sleep 1 -hide test-client 1 -sleep 2 -# -# slide.totop and show/hide -animation test-client slide.totop 400 -show test-client 1 -sleep 1 -hide test-client 1 -sleep 2 -# -# slide.tobottom and show/hide -animation test-client slide.tobottom 400 -show test-client 1 -sleep 1 -hide test-client 1 -sleep 2 -# -# zoom and show/hide -animation test-client zoom 400 -show test-client 1 -sleep 1 -hide test-client 1 -sleep 3 -# -# fade and move -animation test-client fade 600 -move test-client 600 200 1 -sleep 2 -move test-client 500 300 1 -sleep 3 -# -waitdestroy 60 -sleep 1 -# -kill test-client -sleep 0.5 -# -# 2. End of Test -bye - diff --git a/tests/testdata/hs_mapsurf.dat b/tests/testdata/hs_mapsurf.dat index 149d6e3..d3d8f1b 100644 --- a/tests/testdata/hs_mapsurf.dat +++ b/tests/testdata/hs_mapsurf.dat @@ -31,7 +31,6 @@ sleep 2 kill test-client kill test-eflapp@1 sleep 1 -sleep 1 # # 2. End of Test bye diff --git a/tests/testdata/hs_sendinput.dat b/tests/testdata/hs_sendinput.dat new file mode 100644 index 0000000..eddbe8d --- /dev/null +++ b/tests/testdata/hs_sendinput.dat @@ -0,0 +1,229 @@ +# Test for Weston IVI Plugin for HomeScreen(SystemController) +# send input event Test +# +# 1. trigger clients +# +launch ../tests/test-client < ../tests/testdata/cl_surface4.dat 2> ../tests/testlog/test-client.log 1>&2 +waitcreate 2 +move test-client 100 200 +show test-client +sleep 1 +# +launch ../tests/test-eflapp @1 -color=0xe02040ff 2> ../tests/testlog/test-eflapp.log 1>&2 +waitcreate 2 +move test-eflapp@1 650 80 +show test-eflapp@1 +# +# 11. send pointer event to general pointer motion(general event) +# +sleep 1 +input_send @ pointer 0 ABS_Z 80 160 +sleep 0.1 +input_send @ pointer 0 ABS_X 270 +input_send @ pointer 0 ABS_Y 440 +sleep 0.1 +input_send @ pointer 0 BTN_LEFT 1 +sleep 0.2 +input_send @ pointer 0 BTN_LEFT 0 +sleep 0.5 +input_send @ pointer 0 ABS_X 272 +input_send @ pointer 0 ABS_Y 438 +sleep 0.1 +input_send @ pointer 0 BTN_LEFT 1 +sleep 0.1 +input_send @ pointer 0 ABS_X 271 +input_send @ pointer 0 ABS_Y 439 +sleep 0.1 +input_send @ pointer 0 BTN_LEFT 0 +sleep 1 +# +# 12. send keyboard event(general event) +# +active test-client +input_send @ keyboard 0 1 1 +input_send @ keyboard 0 1 0 +sleep 0.2 +input_send @ keyboard 0 2 1 +sleep 0.1 +input_send @ keyboard 0 2 0 +sleep 1 +# +# 13. send touch event(general event) +# +active test-client +input_send @ touch 0 ABS_Z 250 450 +input_send @ touch 0 BTN_TOUCH 1 +sleep 0.1 +input_send @ touch 0 ABS_Z 255 455 +sleep 0.2 +input_send @ touch 0 BTN_TOUCH 0 +sleep 1 +# +# 14. switch event(general event) +# +active test-client +input_send @ switch 0 11 1 +input_send @ switch 0 11 0 +sleep 0.1 +input_send @ switch 0 12 1 +sleep 0.1 +input_send @ switch 0 12 0 +sleep 1 +# +# 15. haptic event(general event) +# +active test-client +input_send @ haptic 0 ABS_Z 260 460 +sleep 0.1 +input_send @ haptic 0 ABS_Z 262 462 +sleep 0.1 +input_send @ haptic 0 BTN_LEFT 1 +sleep 0.1 +input_send @ haptic 0 BTN_LEFT 0 +sleep 1 +# +# 21. send pointer event to general pointer motion(appid) +# +sleep 1 +input_send @test-client pointer 0 ABS_Z 80 160 +sleep 0.1 +input_send @test-client pointer 0 ABS_X 270 +input_send @test-client pointer 0 ABS_Y 440 +sleep 0.1 +input_send @test-client pointer 0 BTN_LEFT 1 +sleep 0.2 +input_send @test-client pointer 0 BTN_LEFT 0 +sleep 0.5 +input_send @test-client pointer 0 ABS_X 272 +input_send @test-client pointer 0 ABS_Y 438 +sleep 0.1 +input_send @test-client pointer 0 BTN_LEFT 1 +sleep 0.1 +input_send @test-client pointer 0 ABS_X 271 +input_send @test-client pointer 0 ABS_Y 439 +sleep 0.1 +input_send @test-client pointer 0 BTN_LEFT 0 +sleep 1 +# +# 22. send keyboard event(appid) +# +active test-client +input_send @test-client keyboard 0 1 1 +input_send @test-client keyboard 0 1 0 +sleep 0.2 +input_send @test-client keyboard 0 2 1 +sleep 0.1 +input_send @test-client keyboard 0 2 0 +sleep 1 +# +# 23. send touch event(appid) +# +active test-client +input_send @test-client touch 0 ABS_Z 250 450 +input_send @test-client touch 0 BTN_TOUCH 1 +sleep 0.1 +input_send @test-client touch 0 ABS_Z 255 455 +sleep 0.2 +input_send @test-client touch 0 BTN_TOUCH 0 +sleep 1 +# +# 24. switch event(appid) +# +active test-client +input_send @test-client switch 0 11 1 +input_send @test-client switch 0 11 0 +sleep 0.1 +input_send @test-client switch 0 12 1 +sleep 0.1 +input_send @test-client switch 0 12 0 +sleep 1 +# +# 25. haptic event(appid) +# +active test-client +input_send @test-client haptic 0 ABS_Z 260 460 +sleep 0.1 +input_send @test-client haptic 0 ABS_Z 262 462 +sleep 0.1 +input_send @test-client haptic 0 BTN_LEFT 1 +sleep 0.1 +input_send @test-client haptic 0 BTN_LEFT 0 +sleep 1 +# +# 31. send pointer event to general pointer motion(urface id) +# +sleep 1 +input_send test-client pointer 0 ABS_Z 80 160 +sleep 0.1 +input_send test-client pointer 0 ABS_X 270 +input_send test-client pointer 0 ABS_Y 440 +sleep 0.1 +input_send test-client pointer 0 BTN_LEFT 1 +sleep 0.2 +input_send test-client pointer 0 BTN_LEFT 0 +sleep 0.5 +input_send test-client pointer 0 ABS_X 272 +input_send test-client pointer 0 ABS_Y 438 +sleep 0.1 +input_send test-client pointer 0 BTN_LEFT 1 +sleep 0.1 +input_send test-client pointer 0 ABS_X 271 +input_send test-client pointer 0 ABS_Y 439 +sleep 0.1 +input_send test-client pointer 0 BTN_LEFT 0 +sleep 1 +# +# 32. send keyboard event(surface id) +# +active test-client +input_send test-client keyboard 0 1 1 +input_send test-client keyboard 0 1 0 +sleep 0.2 +input_send test-client keyboard 0 2 1 +sleep 0.1 +input_send test-client keyboard 0 2 0 +sleep 1 +# +# 33. send touch event(surface id) +# +active test-client +input_send test-client touch 0 ABS_Z 250 450 +input_send test-client touch 0 BTN_TOUCH 1 +sleep 0.1 +input_send test-client touch 0 ABS_Z 255 455 +sleep 0.2 +input_send test-client touch 0 BTN_TOUCH 0 +sleep 1 +# +# 34. switch event(surface id) +# +active test-client +input_send test-client switch 0 11 1 +input_send test-client switch 0 11 0 +sleep 0.1 +input_send test-client switch 0 12 1 +sleep 0.1 +input_send test-client switch 0 12 0 +sleep 1 +# +# 35. haptic event(surface id) +# +active test-client +input_send test-client haptic 0 ABS_Z 260 460 +sleep 0.1 +input_send test-client haptic 0 ABS_Z 262 462 +sleep 0.1 +input_send test-client haptic 0 BTN_LEFT 1 +sleep 0.1 +input_send test-client haptic 0 BTN_LEFT 0 +sleep 1 +# +sleep 60 +# +kill test-client +kill test-eflapp@1 +sleep 1 +# +# 99. End of Test +bye + diff --git a/tests/weston-plugin-vbox b/tests/weston-plugin-test.send_input index 06304ab..f243dd6 100755 --- a/tests/weston-plugin-vbox +++ b/tests/weston-plugin-test.send_input @@ -14,11 +14,8 @@ sleep 1 # 3 Weston/Wayland Envionment export QT_QPA_PLATFORM=wayland -#export ELM_ENGINE=wayland_egl -#export ECORE_EVAS_ENGINE=wayland_egl -export ELM_ENGINE=wayland_shm -export ECORE_EVAS_ENGINE=wayland_shm -export XDG_RUNTIME_DIR=/run/user/5000 +export ELM_ENGINE=wayland_egl +export ECORE_EVAS_ENGINE=wayland_egl # 4 Set Environment for Test export WESTON_IVI_PLUGIN_DIR="../src/.libs" @@ -26,14 +23,14 @@ export WESTON_IVI_PLUGIN_DIR="../src/.libs" # 5 Start Weston export XDG_CONFIG_HOME="../tests" MOD_DIR="$PWD/../src/.libs" -/usr/bin/weston --backend=fbdev-backend.so --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log & +/usr/bin/weston --modules=$MOD_DIR/ico_plugin_loader.so --idle-time=0 --log=../tests/testlog/weston.log & sleep 1 # 6 Set library path export LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH # 7 Start test-homescreen -../tests/test-homescreen < ../tests/testdata/hs_alltest.dat 2> ../tests/testlog/test-homescreen.log +../tests/test-homescreen < ../tests/testdata/hs_sendinput.dat 2> ../tests/testlog/test-homescreen.log # 8 End of Test sleep 2 diff --git a/tests/weston.ini b/tests/weston.ini index 8e3d53d..00bb382 100644 --- a/tests/weston.ini +++ b/tests/weston.ini @@ -17,6 +17,11 @@ shell-exe= #transform=90 #[output] +#name=HDMI2 +#mode=1280x480 +#mode=100.00 1280 1300 1400 1400 480 500 600 700 -hsync +vsyn + +#[output] #name=LVDS1 #mode=1680x1050 #transform=90 @@ -41,10 +46,13 @@ displayno=1,0 # default layer id default=1 # layer id at the time of the system startup -startup=101 +startup=109 +# background layer id +background=0 # input layer id input=101 # cursor layer id +cursor=102 [ivi-animation] # default animation @@ -52,13 +60,13 @@ default=fade # animation time (ms) time=500 # animation frame rate(frame/sec) -fps=15 +fps=30 [ivi-debug] # debug flags # bit.0 0=hide on surface create(for with HomeScreen)/1=show on surface create flag=0 -# 0=no debug log write(1=err/2=warn/3=info/4=debug) -log=4 +# 0=no debug log write(1=err/2=warn/3=info/4=trace/5=debug) +log=5 diff --git a/tests/weston.ini.fullhd b/tests/weston.ini.fullhd deleted file mode 100644 index 8f5745a..0000000 --- a/tests/weston.ini.fullhd +++ /dev/null @@ -1,64 +0,0 @@ -[core] -modules=error_but_no_problem_for_test.so -# This is Error for Test(No Problem) - -#[input-method] -#path=/no_input_method_err_but_no_problem.so - -[shell] -num-workspaces=1 -shell-exe= - -[output] -name=HDMI3 -#mode=1680x945 -#mode=1920x1080 -mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync -transform=90 - -#[output] -#name=LVDS1 -#mode=1680x1050 -#transform=90 - -#[output] -#name=VGA1 -#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync -#transform=90 - -#[output] -#name=X1 -#mode=1024x768 -#transform=flipped-270 - -[ivi-plugin] -modules=ico_ivi_shell.so,ico_window_mgr.so,ico_window_animation.so,ico_input_mgr.so - -[ivi-display] -displayno=1,0 - -[ivi-layer] -# default layer id -default=1 -# layer id at the time of the system startup -startup=101 -# input layer id -input=101 -# cursor layer id - -[ivi-animation] -# default animation -default=fade -# animation time (ms) -time=500 -# animation frame rate(frame/sec) -fps=15 - -[ivi-debug] -# debug flags -# bit.0 0=hide on surface create(for with HomeScreen)/1=show on surface create -flag=0 - -# 0=no debug log write(1=err/2=warn/3=info/4=debug) -log=4 - |