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

Issue 914303007: Fix runit.py script on windows. (Closed)

Created:
5 years, 10 months ago by David Yen
Modified:
5 years, 10 months ago
CC:
chromium-reviews, kjellander-cc_chromium.org, cmp-cc_chromium.org, stip+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/build.git@master
Target Ref:
refs/heads/master
Project:
tools
Visibility:
Public.

Description

Fix runit.py script on windows. Windows does not execute python scripts directly so it must call the python executable R=agable@chromium.org, dnj@chromium.org, petermayo@chromium.org BUG=None TEST=local, gclient runhooks works properly under a normal shell. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=294048

Patch Set 1 #

Total comments: 2

Patch Set 2 : prepend executable for all platforms #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M scripts/tools/runit.py View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (2 generated)
David Yen
5 years, 10 months ago (2015-02-12 00:47:49 UTC) #1
David Yen
On 2015/02/12 00:47:49, David Yen wrote: This is a continuation of https://codereview.chromium.org/888113002. I'm not sure ...
5 years, 10 months ago (2015-02-12 00:54:48 UTC) #2
dnj
+stip@, who wrote most of runit.py. https://codereview.chromium.org/914303007/diff/1/scripts/tools/runit.py File scripts/tools/runit.py (right): https://codereview.chromium.org/914303007/diff/1/scripts/tools/runit.py#newcode89 scripts/tools/runit.py:89: if 'win' in ...
5 years, 10 months ago (2015-02-12 00:55:22 UTC) #4
David Yen
https://codereview.chromium.org/914303007/diff/1/scripts/tools/runit.py File scripts/tools/runit.py (right): https://codereview.chromium.org/914303007/diff/1/scripts/tools/runit.py#newcode89 scripts/tools/runit.py:89: if 'win' in sys.platform.lower(): On 2015/02/12 00:55:22, dnj wrote: ...
5 years, 10 months ago (2015-02-12 17:17:40 UTC) #5
dnj
lgtm
5 years, 10 months ago (2015-02-12 17:55:41 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/914303007/20001
5 years, 10 months ago (2015-02-12 19:39:56 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001) as http://src.chromium.org/viewvc/chrome?view=rev&revision=294048
5 years, 10 months ago (2015-02-12 19:43:07 UTC) #9
jam
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/923723002/ by jam@chromium.org. ...
5 years, 10 months ago (2015-02-12 21:13:39 UTC) #10
David Yen
5 years, 10 months ago (2015-02-12 21:24:41 UTC) #11
Message was sent while issue was closed.
On 2015/02/12 21:13:39, jam wrote:
> A revert of this CL (patchset #2 id:20001) has been created in
> https://codereview.chromium.org/923723002/ by mailto:jam@chromium.org.
> 
> The reason for reverting is: Causing telemetry failures on bots, i.e.
>
http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_....

It looks like invocations of the script have worked around this problem by
prepending python themselves when they are running on multiple platforms. Other
places that only run in linux scripts just pass in the python .py file as the
first argument.

I think the proper fix would be to always prepend python executable within the
script, and if the invoker would rather specify their own path to python have it
by done through a flag (ie. --python /usr/local/bin/python2.6) which basically
overrides sys.executable in the script.

However, I'm not too familiar with some of the code and cannot make the
distinction between when the invoker is trying to find a valid python file on a
certain platform or trying to target a specific python directory for test
reasons. For example in chromium_commands.py we have this:

    if self._target_platform == 'win32':
      py26 = J('src', 'third_party', 'python_26', 'python_slave.exe')
      test_cmd = ['cmd', '/C'] + [py26, script] + args
    elif self._target_platform == 'darwin':
      test_cmd = ['python2.6', script] + args
    elif self._target_platform == 'linux2':
      # Run thru runtest.py on linux to launch virtual x server
      test_cmd = self.GetTestCommand('/usr/local/bin/python2.6',
                                     [script] + args)

Are those python paths intentional for test reasons? Or are they merely known
locations where python would exist?

Powered by Google App Engine
This is Rietveld 408576698