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

Issue 8774018: Add psutil build step to fix pyauto media issues. Upgrade psutil to 0.4.0. (Closed)

Created:
9 years ago by DaleCurtis
Modified:
9 years ago
Reviewers:
Nico, Nirnimesh
CC:
chromium-reviews, imasaki1
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Fixes broken media tests which were dependent on psutil. I've only setup the build rules for linux right now as we've only got a Linux bot. The psutil build requires that it be run from source directory, so a small wrapper script was necessary to handle this and convert output paths to absolute. If there's a way to do this in GYP let me know. Most of the CL is just psutil upgrades, the important files are: chrome/chrome_tests.gypi third_party/psutil/build.py I attached the new build step to pyautolib. Let me know if it should be elsewhere. BUG=106105 TEST=Ran linux build. Ran media pyauto test.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Code review fixes. #

Patch Set 3 : Spacing. #

Patch Set 4 : Add OSX, WIN support. #

Total comments: 10

Patch Set 5 : Create psutil.gyp #

Patch Set 6 : Fix warning, touch files. #

Patch Set 7 : Replace 'python' w/ sys.executable. #

Total comments: 7

Patch Set 8 : Disable Mac builds. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1646 lines, -506 lines) Patch
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/psutil/HISTORY View 2 chunks +15 lines, -1 line 0 comments Download
M third_party/psutil/PKG-INFO View 1 chunk +7 lines, -7 lines 0 comments Download
M third_party/psutil/README.chromium View 1 chunk +4 lines, -5 lines 0 comments Download
A third_party/psutil/build.py View 1 2 3 4 5 6 7 1 chunk +44 lines, -0 lines 2 comments Download
A third_party/psutil/docs/class_diagram.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M third_party/psutil/docs/documentation.html View 8 chunks +46 lines, -18 lines 0 comments Download
M third_party/psutil/examples/iotop.py View 3 chunks +65 lines, -40 lines 0 comments Download
A third_party/psutil/examples/nettop.py View 1 chunk +143 lines, -0 lines 0 comments Download
M third_party/psutil/examples/process_detail.py View 5 chunks +11 lines, -5 lines 0 comments Download
A third_party/psutil/examples/top.py View 1 chunk +202 lines, -0 lines 0 comments Download
A third_party/psutil/psutil.gyp View 1 2 3 4 5 6 7 1 chunk +93 lines, -0 lines 0 comments Download
M third_party/psutil/psutil/__init__.py View 5 chunks +86 lines, -71 lines 0 comments Download
M third_party/psutil/psutil/_common.py View 4 chunks +31 lines, -1 line 0 comments Download
M third_party/psutil/psutil/_compat.py View 2 chunks +15 lines, -28 lines 0 comments Download
M third_party/psutil/psutil/_psbsd.py View 5 chunks +48 lines, -8 lines 0 comments Download
M third_party/psutil/psutil/_pslinux.py View 5 chunks +95 lines, -64 lines 0 comments Download
M third_party/psutil/psutil/_psmswindows.py View 3 chunks +10 lines, -4 lines 0 comments Download
M third_party/psutil/psutil/_psosx.py View 2 chunks +10 lines, -5 lines 0 comments Download
M third_party/psutil/psutil/_psposix.py View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/psutil/psutil/_psutil_bsd.h View 3 chunks +8 lines, -1 line 0 comments Download
M third_party/psutil/psutil/_psutil_bsd.c View 9 chunks +174 lines, -5 lines 0 comments Download
M third_party/psutil/psutil/_psutil_linux.h View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/psutil/psutil/_psutil_linux.c View 9 chunks +28 lines, -11 lines 0 comments Download
M third_party/psutil/psutil/_psutil_mswindows.h View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/psutil/psutil/_psutil_mswindows.c View 11 chunks +375 lines, -184 lines 0 comments Download
M third_party/psutil/psutil/_psutil_osx.c View 6 chunks +22 lines, -11 lines 0 comments Download
M third_party/psutil/psutil/arch/bsd/process_info.c View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/psutil/setup.py View 6 chunks +9 lines, -7 lines 0 comments Download
M third_party/psutil/test/_posix.py View 2 chunks +17 lines, -1 line 0 comments Download
M third_party/psutil/test/_windows.py View 3 chunks +15 lines, -2 lines 0 comments Download
M third_party/psutil/test/test_memory_leaks.py View 3 chunks +8 lines, -4 lines 0 comments Download
M third_party/psutil/test/test_psutil.py View 17 chunks +56 lines, -20 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
DaleCurtis
PTAL. Please suggest alternate reviewers if I've chosen poorly.
9 years ago (2011-12-01 22:17:42 UTC) #1
Nirnimesh
http://codereview.chromium.org/8774018/diff/1/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): http://codereview.chromium.org/8774018/diff/1/chrome/chrome_tests.gypi#newcode4065 chrome/chrome_tests.gypi:4065: 'test_support_psutil', where did you specify this dep on linux ...
9 years ago (2011-12-07 00:30:41 UTC) #2
DaleCurtis
http://codereview.chromium.org/8774018/diff/1/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): http://codereview.chromium.org/8774018/diff/1/chrome/chrome_tests.gypi#newcode4065 chrome/chrome_tests.gypi:4065: 'test_support_psutil', On 2011/12/07 00:30:41, Nirnimesh wrote: > where did ...
9 years ago (2011-12-07 01:26:08 UTC) #3
Nirnimesh
> > > In the conditions section above, I only provided outputs for > OS=="linux". ...
9 years ago (2011-12-07 02:56:05 UTC) #4
DaleCurtis
When you run build.py on Linux do you get a setup.py as well? Seems weird ...
9 years ago (2011-12-07 23:22:48 UTC) #5
Nirnimesh
Yes, I do get setup.py on mac and win. But you don't need to care ...
9 years ago (2011-12-08 00:23:41 UTC) #6
DaleCurtis
http://codereview.chromium.org/8774018/diff/10001/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): http://codereview.chromium.org/8774018/diff/10001/chrome/chrome_tests.gypi#newcode446 chrome/chrome_tests.gypi:446: { On 2011/12/08 00:23:41, Nirnimesh wrote: > I forgot ...
9 years ago (2011-12-08 22:04:38 UTC) #7
cmp
I trust Nirnimesh has this covered. Let me know if you want me to take ...
9 years ago (2011-12-08 22:30:40 UTC) #8
Nirnimesh
http://codereview.chromium.org/8774018/diff/10001/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): http://codereview.chromium.org/8774018/diff/10001/chrome/chrome_tests.gypi#newcode446 chrome/chrome_tests.gypi:446: { On 2011/12/08 22:04:38, DaleCurtis wrote: > On 2011/12/08 ...
9 years ago (2011-12-08 22:40:55 UTC) #9
DaleCurtis
http://codereview.chromium.org/8774018/diff/10001/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): http://codereview.chromium.org/8774018/diff/10001/chrome/chrome_tests.gypi#newcode446 chrome/chrome_tests.gypi:446: { On 2011/12/08 22:40:56, Nirnimesh wrote: > On 2011/12/08 ...
9 years ago (2011-12-08 23:03:36 UTC) #10
Nirnimesh
On 2011/12/08 23:03:36, DaleCurtis wrote: > http://codereview.chromium.org/8774018/diff/10001/chrome/chrome_tests.gypi > File chrome/chrome_tests.gypi (right): > > http://codereview.chromium.org/8774018/diff/10001/chrome/chrome_tests.gypi#newcode446 > ...
9 years ago (2011-12-09 00:00:40 UTC) #11
DaleCurtis
On 2011/12/09 00:00:40, Nirnimesh wrote: > On 2011/12/08 23:03:36, DaleCurtis wrote: > > http://codereview.chromium.org/8774018/diff/10001/chrome/chrome_tests.gypi > ...
9 years ago (2011-12-09 01:25:33 UTC) #12
Nirnimesh
LGTM
9 years ago (2011-12-09 02:31:09 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/8774018/19001
9 years ago (2011-12-09 19:29:42 UTC) #14
commit-bot: I haz the power
Try job failure for 8774018-19001 (retry) on mac_rel for step "compile" (clobber build). It's a ...
9 years ago (2011-12-09 20:34:32 UTC) #15
DaleCurtis
On 2011/12/09 20:34:32, I haz the power (commit-bot) wrote: > Try job failure for 8774018-19001 ...
9 years ago (2011-12-09 21:22:14 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dalecurtis@chromium.org/8774018/19001
9 years ago (2011-12-09 21:53:07 UTC) #17
commit-bot: I haz the power
Try job failure for 8774018-19001 (retry) on mac_rel for step "compile" (clobber build). It's a ...
9 years ago (2011-12-09 23:13:08 UTC) #18
DaleCurtis
On 2011/12/09 23:13:08, I haz the power (commit-bot) wrote: > Try job failure for 8774018-19001 ...
9 years ago (2011-12-09 23:14:16 UTC) #19
Nico
http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/build.py File third_party/psutil/build.py (right): http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/build.py#newcode20 third_party/psutil/build.py:20: # the source directory, we must convert the output ...
9 years ago (2011-12-12 18:20:09 UTC) #20
DaleCurtis
PTAL, I've disable the Mac builds for now. http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/build.py File third_party/psutil/build.py (right): http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/build.py#newcode20 third_party/psutil/build.py:20: # ...
9 years ago (2011-12-12 19:23:20 UTC) #21
Nirnimesh
Please update the description. http://codereview.chromium.org/8774018/diff/26001/third_party/psutil/build.py File third_party/psutil/build.py (right): http://codereview.chromium.org/8774018/diff/26001/third_party/psutil/build.py#newcode13 third_party/psutil/build.py:13: nit: leave another blank line ...
9 years ago (2011-12-12 21:07:10 UTC) #22
Nico
http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/psutil.gyp File third_party/psutil/psutil.gyp (right): http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/psutil.gyp#newcode83 third_party/psutil/psutil.gyp:83: 'build.py', On 2011/12/12 19:23:20, DaleCurtis wrote: > Hi Nico, ...
9 years ago (2011-12-12 23:20:43 UTC) #23
DaleCurtis
http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/psutil.gyp File third_party/psutil/psutil.gyp (right): http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/psutil.gyp#newcode83 third_party/psutil/psutil.gyp:83: 'build.py', I didn't realize you guys were already doing ...
9 years ago (2011-12-12 23:34:56 UTC) #24
Nico
http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/psutil.gyp File third_party/psutil/psutil.gyp (right): http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/psutil.gyp#newcode83 third_party/psutil/psutil.gyp:83: 'build.py', On 2011/12/12 23:34:57, DaleCurtis wrote: > I didn't ...
9 years ago (2011-12-12 23:42:11 UTC) #25
DaleCurtis
9 years ago (2011-12-12 23:48:15 UTC) #26
On 2011/12/12 23:34:56, DaleCurtis wrote:
>
http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/psutil.gyp
> File third_party/psutil/psutil.gyp (right):
> 
>
http://codereview.chromium.org/8774018/diff/19001/third_party/psutil/psutil.g...
> third_party/psutil/psutil.gyp:83: 'build.py',
> I didn't realize you guys were already doing that, if that's the case I can
look
> into it. At least for the Linux build (which is all we need right now) it
looks
> pretty easy.
> 
> The tests are using psutil to record process utilization metrics while videos
> are playing. We could remove it from the tree and just require users install
the
> package prior to use.
> 
> That would mean the chromiumos.perf_av build slave would need these packages
> installed manually.
> 
> On 2011/12/12 23:20:43, Nico wrote:
> > On 2011/12/12 19:23:20, DaleCurtis wrote:
> > > Hi Nico, I'm not sure what you mean by a real gyp file. Can you elaborate?
> Do
> > > you mean converting the setup.py that's packaged with psutil into a gyp
> file?
> > 
> > Yes.
> > 
> > > If so, I'd rather not go that way since it's subject to upstream changes.
> > 
> > It's what we do for all third-party libraries we pull. Usually, upstream
> doesn't
> > change that often, and keeping source lists in sync isn't that big of a
deal.
> > 
> > Having a normal gyp file means that stuff like goma, custom compilers, new
> build
> > systems, etc all have a chance of being supported.
> > 
> > I don't know if it's possible to do python packages that way though.
Ideally,
> > the media tests would not depend on psutil – do you know what they use it
for?

Just talked to cmp and he said install-build-deps is fine. I'm going to abandon
this CL, submit a new one to remove psutil from the tree and update
install-build-deps.

Thanks for the reviews everyone!

Powered by Google App Engine
This is Rietveld 408576698