Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Issue 1148006: autox: port to Python. (Closed)

Created:
10 years, 9 months ago by Daniel Erat
Modified:
9 years, 7 months ago
Reviewers:
Chris Masone, sosa
CC:
chromium-os-reviews_chromium.org, Daniel Erat
Visibility:
Public.

Description

autox: port to Python. I still need to figure out the build system part of this, but here's a first look at a version that runs under Karmic with the python-xlib package installed. I'll start adding additional stuff to this soon (e.g. get ID of window that's focused / has title "X" / is listed in the active window property). BUG=none TEST=none

Patch Set 1 #

Patch Set 2 : fix license (Chromium -> Chromium OS) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+388 lines, -0 lines) Patch
A src/platform/autox/autox.py View 1 1 chunk +388 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Daniel Erat
10 years, 9 months ago (2010-03-23 02:17:08 UTC) #1
sosa
This looks great! LGTM. Let me know if you need any help with the build ...
10 years, 9 months ago (2010-03-23 16:55:25 UTC) #2
Daniel Erat
On Tue, Mar 23, 2010 at 9:55 AM, <sosa@chromium.org> wrote: > This looks great! LGTM. ...
10 years, 9 months ago (2010-03-23 19:33:01 UTC) #3
Chris Masone
On Tue, Mar 23, 2010 at 12:32 PM, Daniel Erat <derat@chromium.org> wrote: > On Tue, ...
10 years, 9 months ago (2010-03-23 19:35:10 UTC) #4
Daniel Erat
Sure, I'll cc you on subsequent changes. On Tue, Mar 23, 2010 at 12:34 PM, ...
10 years, 9 months ago (2010-03-23 19:38:54 UTC) #5
sosa
So this part is actually a bit complicated. Right now we are pulling in the ...
10 years, 9 months ago (2010-03-23 19:41:35 UTC) #6
Chris Masone
On Tue, Mar 23, 2010 at 12:41 PM, Chris Sosa <sosa@chromium.org> wrote: > So this ...
10 years, 9 months ago (2010-03-23 19:44:10 UTC) #7
sosa
Thanks, sgtm On Tue, Mar 23, 2010 at 12:43 PM, Chris Masone <cmasone@chromium.org> wrote: > ...
10 years, 9 months ago (2010-03-23 19:45:35 UTC) #8
Daniel Erat
On Tue, Mar 23, 2010 at 12:41 PM, Chris Sosa <sosa@chromium.org> wrote: > So this ...
10 years, 9 months ago (2010-03-23 22:03:35 UTC) #9
sosa
The problem is, if you do the rdepend that way, python-xlib module will be installed ...
10 years, 9 months ago (2010-03-23 22:06:20 UTC) #10
Chris Masone
One can add it as a hard-host-depends as well, and that'd do it, right? make ...
10 years, 9 months ago (2010-03-23 22:11:35 UTC) #11
sosa1
Yes that would be the right way. On Tue, Mar 23, 2010 at 3:11 PM, ...
10 years, 9 months ago (2010-03-23 22:16:29 UTC) #12
sosa
10 years, 9 months ago (2010-03-23 22:19:56 UTC) #13
Duh, sorry up to now I was thinking Dan was going to incorporate the
autox.py as a helper module to autotest and have it in the autotest
repo.  I realize now that that assumption was wrong.  My bad!

On Tue, Mar 23, 2010 at 3:16 PM, Chris Sosa <sosa@google.com> wrote:
> Yes that would be the right way.
>
> On Tue, Mar 23, 2010 at 3:11 PM, Chris Masone <cmasone@chromium.org> wrote:
>> One can add it as a hard-host-depends as well, and that'd do it, right?
>> make chromeos-base/autox depend on dev-python/python-xlib
>> and then make chromeos-test and chromeos-dev depend on autox -- and make
>> autox a hard-host-depend.
>> no?
>> On Tue, Mar 23, 2010 at 3:06 PM, Chris Sosa <sosa@chromium.org> wrote:
>>>
>>> The problem is, if you do the rdepend that way, python-xlib module
>>> will be installed in the sysroot where python is installed in your
>>> root root i.e. / in your chroot.  So, when we build your test on the
>>> host, it won't find the python-lib module because it isn't looking in
>>> your sysroot modules ... rather your root root modules.
>>>
>>> On Tue, Mar 23, 2010 at 3:03 PM, Daniel Erat <derat@chromium.org> wrote:
>>> > On Tue, Mar 23, 2010 at 12:41 PM, Chris Sosa <sosa@chromium.org> wrote:
>>> >> So this part is actually a bit complicated.
>>> >>
>>> >> Right now we are pulling in the C++ autox with the autox deps in
>>> >> autotest/client.  Basically what the deps does is copy /usr/bin/autox
>>> >> from the SYSROOT of the current images board into the working
>>> >> directory of the autotest job before it gets run (so it gets pulled
>>> >> across the ssh bridge to run on the target).  /usr/bin/autox get
>>> >> installed by the autox RDEPEND of autotest.  So, /usr/bin/autox
>>> >> doesn't actually reside on the target image except during a test run.
>>> >>
>>> >> For your change you have to do two things:
>>> >>
>>> >> 1)  Add the python-xlib RDEPEND to both hard-host-depends (so that
>>> >> build_autotest can actually load your python scripts on the host ...
>>> >> o/w you'll get a  warning and any future deps of it won't get built)
>>> >> 2)  For now, add python-xlib RDEPEND to both the chromeos-test and
>>> >> chromeos-dev ebuild.  The former for future test builds and the latter
>>> >> for it to work now.  This is necessary because we don't actually copy
>>> >> over python to the target ... instead we assume that python is
>>> >> installed with its necessary modules over there.
>>> >>  -- Note, an alternative is to somehow use deps to pull in the pyhton
>>> >> module to your test.  I'm not sure if this is desired though.
>>> >
>>> > Can't I just make chromeos-base/autox depend on dev-python/python-xlib
>>> > and then make chromeos-test and chromeos-dev depend on autox?  I have
>>> > some ideas about how we can avoid needing to install autox on the host
>>> > system, but even without that, it seems like just listing autox as a
>>> > dependency for both the host and test systems is a lot cleaner than
>>> > having autotest copy the autox stuff over when it runs the tests.
>>> >
>>> >>>> http://codereview.chromium.org/1148006
>>> >
>>
>>
>
>
>
> --
> Chris Sosa
> Software Engineer
> Chrome OS
> Google
>

Powered by Google App Engine
This is Rietveld 408576698