firmware_TouchpadMTB: add robot control for two-finger gestu... [chromiumos/third_party/autotest : master]

20 views
Skip to first unread message

Joseph Shyh-In Hwang (Code Review)

unread,
Nov 2, 2012, 6:21:40 AM11/2/12
to
Joseph Shyh-In Hwang has uploaded a new change for review.

Change subject: firmware_TouchpadMTB: add robot control for two-finger gestures
......................................................................

firmware_TouchpadMTB: add robot control for two-finger gestures

Add the robot control for testing two-finger gestures after
those one-finger ones. The two-finger gestures includes
TWO_FINGER_TRACKING,
TWO_FINGER_SWIPE,
TWO_FINGER_TAP, and
TWO_FINGER_PHYSICAL_CLICK

When all one-finger gestures have been performed, the system will
pause until a user hits SPACE on the chromebook under test. The
system will continue performing the remaining two-finger gestures
until completion.

BUG=chromium-os:35751
TEST=Run the following command on a chromebook set up with the robot.
$ DISPLAY=:0 OPTIONS="-m ROBOT" python main.py
The robot should perform both one-finger and two-finger gestures.

Change-Id: I5e4172c8480f1eba3099406e8247dc1d4b41ad13
---
M client/site_tests/firmware_TouchpadMTB/robot_wrapper.py
M client/site_tests/firmware_TouchpadMTB/test_conf.py
M client/site_tests/firmware_TouchpadMTB/test_flow.py
3 files changed, 53 insertions(+), 2 deletions(-)


git pull ssh://gerrit.chromium.org:29418/chromiumos/third_party/autotest refs/changes/98/37198/1
--
To view, visit https://gerrit.chromium.org/gerrit/37198
To unsubscribe, visit https://gerrit.chromium.org/gerrit/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e4172c8480f1eba3099406e8247dc1d4b41ad13
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Joseph Shyh-In Hwang <jose...@chromium.org>

Charlie Mooney (Code Review)

unread,
Nov 2, 2012, 12:00:05 PM11/2/12
to Joseph Shyh-In Hwang, Gerrit
Charlie Mooney has posted comments on this change.

Change subject: firmware_TouchpadMTB: add robot control for two-finger gestures
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(5 inline comments)

Looks good, so nice to see how easy it is to add new tests. Great design

....................................................
File client/site_tests/firmware_TouchpadMTB/robot_wrapper.py
Line 110: # test with different tap locations instead for convenience.
I'm not entirely sure what you mean here. It looks like you're just testing 2-finger taps in a couple spots on the touchpad, so what's the comment before about how the fingers are aligned?

Line 112: GV.VERTICAL: (START, CENTER),
It's likely that one of the fingers will be off the touchpad for this test. The location is specified by the first finger (the one that's always in the down position) and it it the finger on the right. So if both fingers are down, and you get too close to the left side of the touchpad, the second (left) finger may not be on it anymore. I would suggest changing this to (END, CENTER) if possible, so you can guarantee that you'll actually get 2 fingers on the pad.

....................................................
File client/site_tests/firmware_TouchpadMTB/test_conf.py
Line 123: # Define those gestures that the robot needs to pause so that a user
"pause after so the user"

....................................................
File client/site_tests/firmware_TouchpadMTB/test_flow.py
Line 396: def _robot_pause(self):
I looks like the only place this is called, it's result is immediately put into _get_prompt_robot_pause(). Could these just be merged into one function that either returns None or the nicely formatted prompt message?

Line 419: print '\n\n' + prompt_msg
Thanks for adding the console output too!

Could you add a comment though to explain why you're displaying the prompt in two places? That might be a little confusing once we've been looking at other stuff for a while
Gerrit-MessageType: comment
Gerrit-Change-Id: I5e4172c8480f1eba3099406e8247dc1d4b41ad13
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Joseph Shyh-In Hwang <jose...@chromium.org>
Gerrit-Reviewer: Charlie Mooney <charli...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>

Joseph Shyh-In Hwang (Code Review)

unread,
Nov 5, 2012, 3:10:12 AM11/5/12
to Gerrit, Charlie Mooney
Joseph Shyh-In Hwang has posted comments on this change.

Change subject: firmware_TouchpadMTB: add robot control for two-finger gestures
......................................................................


Patch Set 1: (5 inline comments)

Fixed code per Charlie's comments. PTAL. Thanks.

....................................................
File client/site_tests/firmware_TouchpadMTB/robot_wrapper.py
Line 110: # test with different tap locations instead for convenience.
They are the original meanings of the two_finger_tap's variations which could be performed in the manual mode.

But in the robot mode, the robot fingers cannot rotate. Hence, have the robot tap at distinct locations instead.

Line 112: GV.VERTICAL: (START, CENTER),
Done. Thank you for pointing this out.

....................................................
File client/site_tests/firmware_TouchpadMTB/test_conf.py
Line 123: # Define those gestures that the robot needs to pause so that a user
Done

....................................................
File client/site_tests/firmware_TouchpadMTB/test_flow.py
Line 396: def _robot_pause(self):
Done

Line 419: print '\n\n' + prompt_msg
Done
Gerrit-MessageType: comment
Gerrit-Change-Id: I5e4172c8480f1eba3099406e8247dc1d4b41ad13
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Joseph Shyh-In Hwang <jose...@chromium.org>
Gerrit-Reviewer: Charlie Mooney <charli...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Joseph Shyh-In Hwang <jose...@chromium.org>

Charlie Mooney (Code Review)

unread,
Nov 5, 2012, 11:34:58 AM11/5/12
to Joseph Shyh-In Hwang, Gerrit
Charlie Mooney has posted comments on this change.

Change subject: firmware_TouchpadMTB: add robot control for two-finger gestures
......................................................................


Patch Set 2: Looks good to me, approved
Gerrit-MessageType: comment
Gerrit-Change-Id: I5e4172c8480f1eba3099406e8247dc1d4b41ad13
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Joseph Shyh-In Hwang <jose...@chromium.org>

Joseph Shyh-In Hwang (Code Review)

unread,
Nov 5, 2012, 9:58:11 PM11/5/12
to Gerrit, Charlie Mooney
Joseph Shyh-In Hwang has posted comments on this change.

Change subject: firmware_TouchpadMTB: add robot control for two-finger gestures
......................................................................


Patch Set 2: Verified; Ready
Gerrit-MessageType: comment
Gerrit-Change-Id: I5e4172c8480f1eba3099406e8247dc1d4b41ad13
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Joseph Shyh-In Hwang <jose...@chromium.org>
Reply all
Reply to author
Forward
0 new messages