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

Issue 23618049: Helper script which can source a bash script and dump environment as JSON. (Closed)

Created:
7 years, 3 months ago by Siva Chandra
Modified:
7 years, 3 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Helper script which can source a bash script and dump environment as JSON. NOTRY=True Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223193

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : Address comments #

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -0 lines) Patch
A build/env_dump.py View 1 2 3 4 1 chunk +44 lines, -0 lines 10 comments Download

Messages

Total messages: 13 (0 generated)
Siva Chandra
7 years, 3 months ago (2013-09-13 23:43:43 UTC) #1
iannucci
lgtm % comments https://chromiumcodereview.appspot.com/23618049/diff/1/build/env_dump.py File build/env_dump.py (right): https://chromiumcodereview.appspot.com/23618049/diff/1/build/env_dump.py#newcode23 build/env_dump.py:23: options, args = parser.parse_args() maybe just ...
7 years, 3 months ago (2013-09-14 00:08:35 UTC) #2
Siva Chandra
Addressed the comments and put it on the CQ.
7 years, 3 months ago (2013-09-14 00:20:43 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sivachandra@chromium.org/23618049/9001
7 years, 3 months ago (2013-09-14 00:22:17 UTC) #4
iannucci
(one more comment) https://chromiumcodereview.appspot.com/23618049/diff/9001/build/env_dump.py File build/env_dump.py (right): https://chromiumcodereview.appspot.com/23618049/diff/9001/build/env_dump.py#newcode29 build/env_dump.py:29: with open(options.output_json, 'w') as f: Actually, ...
7 years, 3 months ago (2013-09-14 00:23:31 UTC) #5
Siva Chandra
OK. Again on the CQ after the last comment.
7 years, 3 months ago (2013-09-14 00:29:32 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sivachandra@chromium.org/23618049/15001
7 years, 3 months ago (2013-09-14 00:32:08 UTC) #7
commit-bot: I haz the power
Change committed as 223193
7 years, 3 months ago (2013-09-14 01:02:26 UTC) #8
Isaac (away)
drive by comments -- mostly for the case where we replace current android env dump ...
7 years, 3 months ago (2013-09-15 08:32:24 UTC) #9
Isaac (away)
https://chromiumcodereview.appspot.com/23618049/diff/15001/build/env_dump.py File build/env_dump.py (right): https://chromiumcodereview.appspot.com/23618049/diff/15001/build/env_dump.py#newcode34 build/env_dump.py:34: envsetup_cmd = ' '.join(args) Or: ' '.join(map(pipes.quote, args))
7 years, 3 months ago (2013-09-15 08:34:01 UTC) #10
iannucci
https://chromiumcodereview.appspot.com/23618049/diff/15001/build/env_dump.py File build/env_dump.py (right): https://chromiumcodereview.appspot.com/23618049/diff/15001/build/env_dump.py#newcode34 build/env_dump.py:34: envsetup_cmd = ' '.join(args) On 2013/09/15 08:32:25, Isaac wrote: ...
7 years, 3 months ago (2013-09-15 09:16:47 UTC) #11
Isaac (away)
https://chromiumcodereview.appspot.com/23618049/diff/15001/build/env_dump.py File build/env_dump.py (right): https://chromiumcodereview.appspot.com/23618049/diff/15001/build/env_dump.py#newcode37 build/env_dump.py:37: '. %s; ./%s -d -f %s' % (envsetup_cmd, __file__, ...
7 years, 3 months ago (2013-09-15 09:28:04 UTC) #12
Siva Chandra
7 years, 3 months ago (2013-09-15 09:39:13 UTC) #13
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/23618049/diff/15001/build/env_dump.py
File build/env_dump.py (right):

https://chromiumcodereview.appspot.com/23618049/diff/15001/build/env_dump.py#...
build/env_dump.py:40: sys.exit('Error running %s and dumping env', envsetup_cmd)
On 2013/09/15 09:16:47, iannucci wrote:
> On 2013/09/15 08:32:25, Isaac wrote:
> > AFAIK, sys.exit only takes one arg. Running new scripts through gpylint (or
> > maybe even the lenient chromium pylint) will catch this. Also might be
cleaner
> > to use 
> > 
> > return '<str>' % envsetup_cmd
> 
> Oh, yeah, sys.exit takes an error code, not a string...

sys.exit takes a string: http://docs.python.org/2.6/library/sys.html#sys.exit

This is clearly my bad, mixed up printf style syntax (',' for a '%') here.

Will send a CL to fix this and the above "quote" fix.

Powered by Google App Engine
This is Rietveld 408576698