|
|
Chromium Code Reviews|
Created:
10 years, 9 months ago by Daniel Erat Modified:
9 years, 7 months ago CC:
chromium-os-reviews_chromium.org, Daniel Erat Visibility:
Public. |
Descriptionautox: 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) #Messages
Total messages: 13 (0 generated)
This looks great! LGTM. Let me know if you need any help with the build aspect of this
On Tue, Mar 23, 2010 at 9:55 AM, <sosa@chromium.org> wrote: > This looks great! LGTM. Let me know if you need any help with the build > aspect > of this Thanks for the quick review. I'm going to check this in first and then add it (along with a dev-python/python-xlib RDEPEND) to the autox ebuild in a separate change. Once it's safe to remove the old C++ autox (is this already the case?), I think that we can make chromeos-base/autotest always RDEPEND on autox instead of hiding it behind a use flag. > http://codereview.chromium.org/1148006 >
On Tue, Mar 23, 2010 at 12:32 PM, Daniel Erat <derat@chromium.org> wrote: > On Tue, Mar 23, 2010 at 9:55 AM, <sosa@chromium.org> wrote: >> This looks great! LGTM. Let me know if you need any help with the build >> aspect >> of this > > Thanks for the quick review. I'm going to check this in first and > then add it (along with a dev-python/python-xlib RDEPEND) to the autox > ebuild in a separate change. > > Once it's safe to remove the old C++ autox (is this already the > case?), Can I port the login-helper-functions I wrote to use the python stuff first? > I think that we can make chromeos-base/autotest always RDEPEND > on autox instead of hiding it behind a use flag. > >> http://codereview.chromium.org/1148006 >> >
Sure, I'll cc you on subsequent changes. On Tue, Mar 23, 2010 at 12:34 PM, Chris Masone <cmasone@chromium.org> wrote: > On Tue, Mar 23, 2010 at 12:32 PM, Daniel Erat <derat@chromium.org> wrote: >> On Tue, Mar 23, 2010 at 9:55 AM, <sosa@chromium.org> wrote: >>> This looks great! LGTM. Let me know if you need any help with the build >>> aspect >>> of this >> >> Thanks for the quick review. I'm going to check this in first and >> then add it (along with a dev-python/python-xlib RDEPEND) to the autox >> ebuild in a separate change. >> >> Once it's safe to remove the old C++ autox (is this already the >> case?), > > Can I port the login-helper-functions I wrote to use the python stuff first? > >> I think that we can make chromeos-base/autotest always RDEPEND >> on autox instead of hiding it behind a use flag. >> >>> http://codereview.chromium.org/1148006 >>> >> >
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. For the port of login-helper functions... are you planning on continuing with the json support? I note this first check-in doesn't have script running support yet. Is this going to be re-added or should cmasone abstract away the json items? On Tue, Mar 23, 2010 at 12:32 PM, Daniel Erat <derat@chromium.org> wrote: > On Tue, Mar 23, 2010 at 9:55 AM, <sosa@chromium.org> wrote: >> This looks great! LGTM. Let me know if you need any help with the build >> aspect >> of this > > Thanks for the quick review. I'm going to check this in first and > then add it (along with a dev-python/python-xlib RDEPEND) to the autox > ebuild in a separate change. > > Once it's safe to remove the old C++ autox (is this already the > case?), I think that we can make chromeos-base/autotest always RDEPEND > on autox instead of hiding it behind a use flag. > >> http://codereview.chromium.org/1148006 >> >
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. > > For the port of login-helper functions... are you planning on > continuing with the json support? I note this first check-in doesn't > have script running support yet. Is this going to be re-added or > should cmasone abstract away the json items? derat and I talked a bit about this earlier, and instead of using the scripts, I'll have a data file that I pull in, and then I'll just use his module to poke at the UI through X. I won't rely on scripts anymore > > > On Tue, Mar 23, 2010 at 12:32 PM, Daniel Erat <derat@chromium.org> wrote: >> On Tue, Mar 23, 2010 at 9:55 AM, <sosa@chromium.org> wrote: >>> This looks great! LGTM. Let me know if you need any help with the build >>> aspect >>> of this >> >> Thanks for the quick review. I'm going to check this in first and >> then add it (along with a dev-python/python-xlib RDEPEND) to the autox >> ebuild in a separate change. >> >> Once it's safe to remove the old C++ autox (is this already the >> case?), I think that we can make chromeos-base/autotest always RDEPEND >> on autox instead of hiding it behind a use flag. >> >>> http://codereview.chromium.org/1148006 >>> >> >
Thanks, sgtm On Tue, Mar 23, 2010 at 12:43 PM, Chris Masone <cmasone@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. >> >> For the port of login-helper functions... are you planning on >> continuing with the json support? I note this first check-in doesn't >> have script running support yet. Is this going to be re-added or >> should cmasone abstract away the json items? > > derat and I talked a bit about this earlier, and instead of using the > scripts, I'll have a data file that I pull in, and then I'll just use > his module to poke at the UI through X. I won't rely on scripts > anymore > >> >> >> On Tue, Mar 23, 2010 at 12:32 PM, Daniel Erat <derat@chromium.org> wrote: >>> On Tue, Mar 23, 2010 at 9:55 AM, <sosa@chromium.org> wrote: >>>> This looks great! LGTM. Let me know if you need any help with the build >>>> aspect >>>> of this >>> >>> Thanks for the quick review. I'm going to check this in first and >>> then add it (along with a dev-python/python-xlib RDEPEND) to the autox >>> ebuild in a separate change. >>> >>> Once it's safe to remove the old C++ autox (is this already the >>> case?), I think that we can make chromeos-base/autotest always RDEPEND >>> on autox instead of hiding it behind a use flag. >>> >>>> http://codereview.chromium.org/1148006 >>>> >>> >> >
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
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 >
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 > > >
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
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 > |
