ec84f267cd18c3571e5b094428397fd0567979a2 |
|
28-Aug-2013 |
Joseph Hwang <josephsih@chromium.org> |
firmware_TouchMTB: replay with a touch input device and capture images It would be handy if we could replay a raw data file into a touch input device node and capture its mtplot image for examination. It requires the following steps: 1. Convert the raw data file in mtplot format to evemu format. 2. Launch mtplot. 3. Use evemu-play to replay the raw data file in evemu format. 4. Dump the screenshot of mtplot and save it in an image file. For more details about the raw data format, the mtplot format looks like: Event: time 171466.621737, type 3 (EV_ABS), code 0 (ABS_X), value 1272 while its corresponding evemu format looks like E: 171466.621737 0003 0000 1272 The mtplot format is more human readable, while only the evemu format is supported by evemu-play to replay the raw data into the touch device node. BUG=chromium:282029 TEST=Follow the steps below on a Link: $ cd /usr/local/autotest/tests/firmware_TouchMTB Replay an existing raw data file using touchpad device node: $ python tools/mtplot_play.py tests/logs/link/20130806_221321-fw_1.0.AA-robot/one_finger_tracking.left_to_right.normal-link-fw_1.0.AA-robot-20130806_221509.dat Replay an existing raw data file using touchscreen device node: (This is only possible on Link which has the touchscreen.) $ python tools/mtplot_play.py -d touchscreen tests/logs/link/20130806_221321-fw_1.0.AA-robot/one_finger_tracking.left_to_right.normal-link-fw_1.0.AA-robot-20130806_221509.dat Observe that it launches mtplot, replays the raw data file, the cursor moves automatically on the mtplot. After the replay is finished, it prompts that the corresponding evemu data file and the image file are saved. Change-Id: Ia291e0dadf05736db64ee1d6a667ff075db9a21c Reviewed-on: https://chromium-review.googlesource.com/167603 Reviewed-by: Charles Mooney <charliemooney@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Commit-Queue: Shyh-In Hwang <josephsih@chromium.org>
/external/autotest/client/site_tests/firmware_TouchMTB/tools/common.py
|