Issue 443539 in chromium: Create webplot to replace mtplot

8 views
Skip to first unread message

chro...@googlecode.com

unread,
Dec 18, 2014, 4:46:56 AM12/18/14
to chromi...@chromium.org
Status: Started
Owner: joseph...@chromium.org
CC: ad...@chromium.org, charliem...@chromium.org, cyw...@chromium.org
Labels: Type-Feature Pri-2 Cr-Internals-Input-Touch-Pad OS-Chrome

New issue 443539 by joseph...@chromium.org: Create webplot to replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539

Since X was removed, it becomes necessary to have a web-based mtplot-like
tool to show finger traces.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Jan 8, 2015, 12:16:56 AM1/8/15
to chromi...@chromium.org

Comment #4 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c4

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : a75286d134ff37afdfea4f313e4fc6d40e1804a2

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang, chrome-internal-fetch
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot, chrome-internal-fetch
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot, chrome-internal-fetch
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I2810a4e8bac7ae9437ab6a2fc0b19beeae24aeb9
Reviewed-at : https://chromium-review.googlesource.com/236837

Add the remote package

This package is extracted from platform/touch_firmware_test directly
except that an __init__.py is added to make it a package.

The remote package is very useful to get touch events through ssh
from a remote dut, either a chromebook or an android machine. The
remote package is included so as to make webplot self-contained.
In this way, webplot server can be run on a dut or on any other host
with python.

BUG=chromium:443539
TEST=manual testing

remote/__init__.py
remote/mtb
remote/remote.py

chro...@googlecode.com

unread,
Jan 8, 2015, 12:17:55 AM1/8/15
to chromi...@chromium.org

Comment #3 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c3

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 89b2e1ee272b602f5c007312a8c0ec55d38661f7

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : Id37f5642b989ca233c0adb07aa503d5a77b6309b
Reviewed-at : https://chromium-review.googlesource.com/237524

Add webplot module

This module uses cherrypy to provide web service, and uses web
sockets to handle messages between client browsers and the web
server. In most cases, the messages are the finger data which
the client browsers are to draw finger traces with. The server
could run on a host supports python, e.g., a unix host or a
chromebook machine.

A thread runs in parallel to get packets continuously from the
specified remote dut. The dut could be a chromebook machine or
an android device.

A connection state object is used to count how many clients have
connected. When a client leaves, it sends a quit message to the
server. If all clients have disconnected, the server would
terminate automatically. This saves the user from the trouble
of terminate the python web server.

BUG=chromium:443539
TEST=None. Will be tested with the related html and js later.

webplot.py

chro...@googlecode.com

unread,
Jan 8, 2015, 12:19:23 AM1/8/15
to chromi...@chromium.org

Comment #2 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c2

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 59a9b76b28a100aaf8d6f7dfa039b22f5eaa515e

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I5d654080d4cf93565db4ef0e1b9c7d44ceabcc5f
Reviewed-at : https://chromium-review.googlesource.com/237525

Add the html and javascript

A html template is provided to serve as default index.html.
A javascript file is used to draw finger traces on the document
canvas which basically mimics the old mtplot. It also supports
some hot keys:

ESC: the clear the screen
'b': toggle the background color
'f': toggle between full and non-full screen
'p': toggle between pressure mode and point mode
'q': notify the server that this client quits
's': notify the server to save the event file

BUG=chromium:443539
TEST=Manually test.
1. Scp the program to a chromebook.
2. Launch a web server to serve touchpad data on the chromebook.
$ python webplot.py
3. Switch to the chrome browser. Type "localhost" in the omnibox.
It will display a dark background. Fingers move on the touchpad
and observe the corresponding finger traces shown on the
browser tab.

webplot.html
webplot.js

chro...@googlecode.com

unread,
Jan 8, 2015, 12:20:24 AM1/8/15
to chromi...@chromium.org

Comment #1 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c1

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 83afd8ce84dd04907afb5fc0983acef02172fd86

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Trybot-Ready 0 : Charlie Mooney, ChromeOS Commit Bot, Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I8f58459912ffa757248a3e758cb3f56efeffa99a
Reviewed-at : https://chromium-review.googlesource.com/239054

Add the full path to webplot.html

This patch adds the full path to webplot.html so that the
webplot server can be launched on any path without errors.

BUG=chromium:443539
TEST=Manually execute webplot.py on any path.
It should execute correctly.

webplot.py

chro...@googlecode.com

unread,
Jan 8, 2015, 12:23:24 AM1/8/15
to chromi...@chromium.org

Comment #5 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c5

Project : chromiumos/platform/touch_firmware_test
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : cca5caf7a7bac6880559e3047f74651059af28b1

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : Id7c10645451891670216b3caea464dda90078948
Reviewed-at : https://chromium-review.googlesource.com/238324

Add a SnapshotStream class to get snapshots in a live stream manner

There is a process() in mtb package which bundles events to snapshots
in a batch manner. This patch adds a new SnapshotStream class to
bundle events into snapshots in a live stream manner.

BUG=chromium:443539
TEST=None. Will be tested in webplot project.

mtb/__init__.py

chro...@googlecode.com

unread,
Jan 13, 2015, 10:58:07 PM1/13/15
to chromi...@chromium.org

Comment #7 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c7

Project : chromiumos/platform/touch_firmware_test
Branch : master
Author : Charlie Mooney <charli...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 350fbc361ce8bf770a29b3a328db8c78548ae5ee

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : ChromeOS Commit Bot, Shyh-In Hwang
Commit-Queue +1: Charlie Mooney
Verified 0 : ChromeOS Commit Bot, Shyh-In Hwang
Verified +1: Charlie Mooney
Commit Queue : Chumped
Change-Id : I243a8599d6b730c5a9e94dfdf3f096b2eec8ae9e
Reviewed-at : https://chromium-review.googlesource.com/239237

Add pressure & x/y minimum parsing to RemoteTouchDevice

Webplot is using the remote touch device library as well to allow the
plotting to be done on another host instead of on the DUT. Currently
it assumes the maximum pressure value for all touch devices if 0xff.
This may be true for ChromeOS devices, but is definitely not true for
Android. (For instance one phone I tested on maxed out at 181 for
some reason)

This CL adds the max_pressure parameter to the ChromeOS and Android
remote touch device classes so that webplot can pull the real values
on whatever random device it's presented with by accessing the
device.max_pressure member.

This CL also adds parsing for the minimum values for x/y/p as currently
it assumes these are zero. I haven't actually seen any devices that
use a minimum other than that, but this addition should allow us to
write code than handles it gracefully.

Which this patch, we should be able to handle whatever weird devices
get thrown at us.

BUG=chromium:443539
TEST=manual testing on two Chromebooks and two Android phones. It was
able to determine the correct values (based on what I saw from manually
looking up the max pressure values) for all devices.

Signed-off-by: Charlie Mooney &lt;charli...@chromium.org&gt;

plotter.py
remote.py
test_suite.py
tests/validator/validators.py

chro...@googlecode.com

unread,
Jan 14, 2015, 4:34:14 AM1/14/15
to chromi...@chromium.org

Comment #8 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c8

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : c4150c94850911424b6d86bee58556313814392f

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Trybot-Ready 0 : Charlie Mooney, ChromeOS Commit Bot
Trybot-Ready +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : Ie7dad244402f20262a9fec84b503b75422336f06
Reviewed-at : https://chromium-review.googlesource.com/239452

Draw outer frame per dimension ratio of touch device

Previously, webplot draws the outer rectangle frame on the canvas
as large as possible. In this patch, it draws the outer frame
conforming to the dimension ratio of the touch device just like
what the old mtplot did.

BUG=chromium:443539
TEST=Manually test that webplot draws a gray outer rectangle on
the canvas with the same dimension ratio of the device.

webplot.js

chro...@googlecode.com

unread,
Feb 3, 2015, 1:38:34 AM2/3/15
to chromi...@chromium.org

Comment #9 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c9

Project : chromiumos/overlays/chromiumos-overlay
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 8cddb4ccf8c372a75fffd89444c51e64cfec8d85

Code-Review 0 : Charlie Mooney, ChromeOS Commit Bot, Chung-yih Wang,
Shyh-In Hwang
Code-Review +2: Mike Frysinger
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot, Chung-yih Wang, Mike
Frysinger
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot, Chung-yih Wang, Mike
Frysinger
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I688cce77f4dccc50e1e34f518cc3d0d79b45ca43
Reviewed-at : https://chromium-review.googlesource.com/240640

evtest: import & customize for webplot project

Webplot is a tool uses the touch events captured by evtest to draw
finger traces on Chrome. It is desirable to stop passing gesture
events to Chrome.

The patch grabs the device when --grab command line option is
present. In this way, no other processes are able to access the
device.

A bug was filed upstream as
https://bugzilla.freedesktop.org/show_bug.cgi?id=88572

BUG=chromium:443539
TEST=Check that the cursor is frozen when --grab option is specified.
$ evtest --grab

app-misc/evtest/Manifest
app-misc/evtest/evtest-1.29-r1.ebuild
app-misc/evtest/evtest-1.29.ebuild
app-misc/evtest/files/1.29-add-grab-flag.patch

chro...@googlecode.com

unread,
Feb 3, 2015, 3:14:36 AM2/3/15
to chromi...@chromium.org

Comment #11 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c11

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 4ebfbd1aa4013b67c8ed85eda13d37c8859e788c

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I172e087b28642bd7e2d5a5213afea353f88a6ad8
Reviewed-at : https://chromium-review.googlesource.com/242469

Add a keyboard interrupt handler

There are two possible approaches to terminate webplot.

In the first approach, a user could press 'q' on the browser to
notify the sever that the client quits.

In the second approach, a user could press ctrl-c to interrupt
the cherrypy server. It is desirable to do some cleanup when
the webplot server is closed this way. In particular, we add
a keyboard interrupt handler to notify the client that the
server is stopping its service. The server must hold on until
receiving the quit message from the client. This is useful
for the client to send the canvas image back to the server
before all processes are terminated which would be done in
a follow-up patch.

BUG=chromium:443539
TEST=Manually execute webplot.py on a chrome os machine.
Press 'q' on chrome to quit, or press ctrl-c to interrupt
the webplot server. The whole thing should be terminated
correctly in both ways.

webplot.js
webplot.py

chro...@googlecode.com

unread,
Feb 3, 2015, 3:15:34 AM2/3/15
to chromi...@chromium.org

Comment #10 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c10

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 82fb35d43c372d4a55ae2da2a6bcad58f29eb022

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I2546c37501987b29ef5b5e888ff14d59ecfc5e99
Reviewed-at : https://chromium-review.googlesource.com/242510

Send the canvas image when the client quits.

When a client quits, it is helpful to save the canvas image
and sends it back to the server for further examination. Saving
the canvas image from the client is useful because the python
server might not run on the same machine as the client.

To save the image, the client strips off the header of the base64
encoding of the png image, and the server converts it into binary
format before saving the file on the server side.

BUG=chromium:443539
TEST=Manually execute webplot.py on a chrome os machine.
Press 'q' on chrome to quit, or press ctrl-c to interrupt
the webplot server. The whole thing should be terminated
correctly in both ways.

webplot.js
webplot.py

chro...@googlecode.com

unread,
Feb 3, 2015, 3:16:34 AM2/3/15
to chromi...@chromium.org

Comment #13 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c13

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 9a991dc28632d7f56990f036e47a7a1b5574849c

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : Ib8bd927cf78a4cb620f021298ca2cb392f9efab5
Reviewed-at : https://chromium-review.googlesource.com/241366

Close the device gracefully when cherrypy exits

When the cherrypy server exits, remember to close the touch device
gracefully. This prevents any local/remote zombie processes.

BUG=chromium:443539
TEST=Manually execute webplot.py on a chrome os machine, and press
ctrl-c to interrupt the server. Confirm that there are no evtest
and ssh zombie processes.

webplot.py

chro...@googlecode.com

unread,
Feb 3, 2015, 3:17:36 AM2/3/15
to chromi...@chromium.org

Comment #14 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c14

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 57bf9a061a684dd4173094eef747341c61e65e29

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Trybot-Ready 0 : Charlie Mooney, ChromeOS Commit Bot, Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I85dd0f43e2469f53bf879f6166a3aa926f005b39
Reviewed-at : https://chromium-review.googlesource.com/241365

Get the spec min/max x/y/pressure from the device

In this patch, the server gets the specs from the device and
passes them to the chrome instead of hard coding them.

BUG=chromium:443539
TEST=Manually execute webplot.py and verify that the chrome side
gets the specs correctly.

webplot.html
webplot.js

chro...@googlecode.com

unread,
Feb 3, 2015, 3:20:36 AM2/3/15
to chromi...@chromium.org

Comment #12 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c12

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 03da68349f3a2493f1db7653af3673d15fbb6e6d

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I9c9d6eb6dc9ce42c48e249c1cb23afbfebeaa99e
Reviewed-at : https://chromium-review.googlesource.com/242069

Display the saved file name on quit

When a user press 'q' to quit webplot. It clears the canvas and
displays the saved filename on the screen.

BUG=chromium:443539
TEST=Manually execute webplot.py on a chrome os machine, and press
'q' on chrome to quit. It would clean the canvas and display the
saved file on the screen.

webplot.js

chro...@googlecode.com

unread,
Feb 3, 2015, 3:23:36 AM2/3/15
to chromi...@chromium.org

Comment #16 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c16

Project : chromiumos/platform/touch_firmware_test
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 778c923ecb40e35ced819017fb3908abf06d586a

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I7f85cd7889ea1f2103fe7a7f4effd8c79839b59c
Reviewed-at : https://chromium-review.googlesource.com/240950

Add grab option in begin_event_stream_cmd

This patch adds a grab option in the evtest command so that it is
possible to prevent the gesture events from being passed to Chrome.
This is desirable because we do not like gestures, e.g., tab
switching with 3f swipe, to be applied to Chrome when webplot is
drawing finger traces on the canvas.

BUG=chromium:443539
TEST=Manually testing the grab option with webplot and confirm
that the touch device is grabbed and no gesture events are passed
up to Chrome.
CQ-DEPEND=https://chromium-review.googlesource.com/#/q/I688cce77f4dccc50e1e34f518cc3d0d79b45ca43,n,z

remote.py

chro...@googlecode.com

unread,
Feb 3, 2015, 3:25:36 AM2/3/15
to chromi...@chromium.org

Comment #15 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c15

Project : chromiumos/platform/touch_firmware_test
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 72e292ad2c23be5a2ccb06a280309a2a12006bef

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I8c3ff9e20f9acf29715b96041d7346c25273ddd6
Reviewed-at : https://chromium-review.googlesource.com/240951

Kill processes when a RemoteTouchDevice object exits

When a RemoteTouchDevice exits, we need to make sure that
EndEventStream() method is invoked for necessary cleanup which
requires two steps:

- Kill the local process running the ssh/adb remote command.
- Kill the remote process running on the remote machine;
otherwise, it just becomes a zombie process.

A zombie evtest process has a serious problem. It may have
grabbed a touch device such that other processes would not
be allowed to access it.

In the _KillSubprocess(), if the event_stream_process becomes
None, it should return True indicating the process was killed
successfully. It should not return None since None returned from
poll() and wait() means that the process was not terminated yet.

A little sleep time is added when killing the remote process to
avoid any race condition between killing an evtest process and
starting another evtest process. Note that evtest processes are
usually invoked twice continuously when using a RemoteTouchDevice
object.

The SanpshotStream's Get method is also modified to handle a None
event generated when the remote evtest process is killed.

BUG=chromium:443539
TEST=Run webplot. Use ctrl-c to interrupt the webplot server.
Use ps to confirm that all evtest processes are terminated too.
$ ps aux | grep evtest

mtb/__init__.py
remote.py

chro...@googlecode.com

unread,
Feb 4, 2015, 12:46:04 AM2/4/15
to chromi...@chromium.org

Comment #17 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c17

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 7aa1ac83bce660c19d54acb48b964c2d484e110e

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I121467efc02aa2c007e5707225b1eada6aea5e6a
Reviewed-at : https://chromium-review.googlesource.com/244286

Add the OWNERS file

BUG=chromium:443539
TEST=None

OWNERS

chro...@googlecode.com

unread,
Feb 4, 2015, 12:47:04 AM2/4/15
to chromi...@chromium.org

Comment #18 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c18

Project : chromiumos/overlays/chromiumos-overlay
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 219c852a5b20c09bf624a8e2514affe3305b6260

Code-Review 0 : Charlie Mooney, ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Mike Frysinger
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot, Mike Frysinger
Commit-Queue +1: Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot, Mike Frysinger
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : Ib40672d6b9a765c475c6896cb930882dca3fdc71
Reviewed-at : https://chromium-review.googlesource.com/244284

webplot: add webplot-9999.ebuild

Webplot is a finger-drawing tool on browsers for touch devices.
This patch adds the 9999 ebuild file for the package.

BUG=chromium:443539
TEST=emerge and cros deploy webplot. It is emerged and installed
to a machine correctly.
CQ-DEPEND=https://chromium-review.googlesource.com/#/q/I1b1f3c1945bb7b0d6b90145d82acec3cae09cec3,n,z

chromeos-base/webplot/files/chromeos-version.sh
chromeos-base/webplot/webplot-9999.ebuild

chro...@googlecode.com

unread,
Feb 4, 2015, 1:04:03 AM2/4/15
to chromi...@chromium.org

Comment #19 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c19

Project: chromiumos/overlays/chromiumos-overlay
Branch : master
Author : Mike Frysinger <vap...@chromium.org>
Commit : a25f4417d81ef7b2454174c39eae3306e4ca2d3c

Code-Review 0 : Shyh-In Hwang
Code-Review +2: Mike Frysinger
Trybot-Ready 0 : Mike Frysinger, Shyh-In Hwang
Verified 0 : Shyh-In Hwang
Verified +1: Mike Frysinger
Commit Queue : Chumped
Change-Id : I40c0f92e00cc67a77037f77f50af44ca243ca3d5
Reviewed-at : https://chromium-review.googlesource.com/245911

Revert "webplot: add webplot-9999.ebuild"

This reverts commit 219c852a5b20c09bf624a8e2514affe3305b6260.

Gerrit is refusing to merge CL:244285 for some reason. Without
that, uprev is failing on bots because this ebuild requires the
new setup.py in the repo. Back out this change until we can get
the other one merged.

BUG=chromium:443539
TEST=None

chro...@googlecode.com

unread,
Feb 24, 2015, 5:34:56 AM2/24/15
to chromi...@chromium.org

Comment #20 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c20

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : f27323ef02b74455b1dc530d762e9e52a9913dc9

Code-Review 0 : Charlie Mooney, ChromeOS Commit Bot, David James, Mike
Frysinger, Shyh-In Hwang
Code-Review +2: Hsinyu Chao
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot, David James, Hsinyu
Chao, Mike Frysinger
Commit-Queue +1: Shyh-In Hwang
Trybot-Ready 0 : Charlie Mooney, ChromeOS Commit Bot, David James, Hsinyu
Chao, Mike Frysinger, Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot, David James, Hsinyu
Chao, Mike Frysinger
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I1b1f3c1945bb7b0d6b90145d82acec3cae09cec3
Reviewed-at : https://chromium-review.googlesource.com/244285

Add setup for webplot package

This patch adds a setup.py and re-organize the source layout
a little so that it could be deployed by distutils.

BUG=chromium:443539
TEST=With the patch in https://chromium-review.googlesource.com/#/c/244284/,
one could manually emerge and cros deploy webplot to a chromebook correctly.

remote/mtb
remote/remote.py
setup.py
webplot/__init__.py
webplot/remote/__init__.py
webplot/remote/mtb
webplot/remote/remote.py
webplot/webplot.html
webplot/webplot.js
webplot/webplot.py

chro...@googlecode.com

unread,
Feb 24, 2015, 5:36:57 AM2/24/15
to chromi...@chromium.org

Comment #21 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c21

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 2185226a32056ddb606c0a21131b7b3cd6f1dd13

Code-Review 0 : ChromeOS Commit Bot, Mike Frysinger, Shyh-In Hwang
Code-Review +2: Hsinyu Chao
Commit-Queue 0 : ChromeOS Commit Bot, Hsinyu Chao, Mike Frysinger
Commit-Queue +1: Shyh-In Hwang
Trybot-Ready 0 : ChromeOS Commit Bot, Hsinyu Chao, Mike Frysinger, Shyh-In
Hwang
Verified 0 : ChromeOS Commit Bot, Hsinyu Chao, Mike Frysinger
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I296a389ffa424fa14972f9be8bba74198a8d711e
Reviewed-at : https://chromium-review.googlesource.com/252554

Rename webplot.sh

This patch renames webplot to webplot.sh to make it clear that it is
a shell script. It also tries to avoid any possible path conflict
as webplot would be used as a directory/site-package name later in a
setup.py file.

BUG=chromium:443539
TEST=None

webplot.sh

chro...@googlecode.com

unread,
Feb 24, 2015, 12:47:24 PM2/24/15
to chromi...@chromium.org
Updates:
Status: Verified

Comment #22 on issue 443539 by ad...@chromium.org: Create webplot to replace
mtplot
https://code.google.com/p/chromium/issues/detail?id=443539

Now that webplot has been created, you should make separate bugs for the
individual added changes.

chro...@googlecode.com

unread,
Mar 2, 2015, 6:07:08 AM3/2/15
to chromi...@chromium.org

Comment #26 on issue 443539 by bugdro...@chromium.org: Create webplot to
replace mtplot
https://code.google.com/p/chromium/issues/detail?id=443539#c26

Project : chromiumos/platform/webplot
Branch : master
Author : Joseph Hwang <jose...@chromium.org>
Committer: ChromeOS Commit Bot <chromeos-...@chromium.org>
Commit : 7a148611b1ef242aa24afef9f00d31c11b8eb7cc

Code-Review 0 : ChromeOS Commit Bot, Shyh-In Hwang
Code-Review +2: Charlie Mooney
Commit-Queue 0 : Charlie Mooney, ChromeOS Commit Bot
Commit-Queue +1: Shyh-In Hwang
Trybot-Ready 0 : Charlie Mooney, ChromeOS Commit Bot, Shyh-In Hwang
Verified 0 : Charlie Mooney, ChromeOS Commit Bot
Verified +1: Shyh-In Hwang
Commit Queue : Chumped
Change-Id : I0379a20bd245389ab9377d1a299a40326f884cf8
Reviewed-at : https://chromium-review.googlesource.com/253390

Add the server address command option

There was a bug about launching a server to probe a remote touch
device. This patch fixed the bug by adding the server address
command option to which the cherrypy server could listen.

To make the command options easier to understand, they are
modified a little bit as follows:
-d: specifies the dut ip address
-s: specifies the server ip address
-p: specifies the server port to which the webplot server listens

BUG=chromium:443539
TEST=Launch the webplot server from chroot.
(cr) $ sudo python webplot.py -d $DUT_IP -p $SERVER_PORT
e.g.,
$ sudo python webplot.py -d 11.22.33.44 -p 8989

On the chrome browser of the host, type
"localhost:8989"

Press 'q' on the browser to terminate.

Note that it is also possible to launch the webplot server on
a chromebook to probe the touch device of another chromebook.

webplot/webplot.py
Reply all
Reply to author
Forward
0 new messages