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

Issue 407693002: Fix .d file outputs, add support for asserting outputs. (Closed)

Created:
6 years, 5 months ago by brettw
Modified:
6 years, 5 months ago
Reviewers:
Nico
CC:
grit-developer_googlegroups.com
Base URL:
https://chromium.googlesource.com/external/grit-i18n.git@master
Visibility:
Public.

Description

Fix .d file outputs, add support for asserting outputs. Fixes .d file generation by putting the first output file name as the destination file, rather than the .d file itself. Adds support for asserting that given files are in the output. This allows the user of the build tool to assume that certain output files will be generated while providing a way to catch errors.

Patch Set 1 #

Patch Set 2 : moah bettah #

Patch Set 3 : long lines #

Total comments: 2

Patch Set 4 : now with tests #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -13 lines) Patch
M grit/tool/build.py View 1 2 5 chunks +66 lines, -9 lines 2 comments Download
M grit/tool/build_unittest.py View 1 2 3 1 chunk +30 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
brettw
6 years, 5 months ago (2014-07-19 20:07:25 UTC) #1
Nico
Looks pretty good, but you probably need to update build_unittest.py with the new expected output ...
6 years, 5 months ago (2014-07-20 22:30:47 UTC) #2
brettw
PTAL https://codereview.chromium.org/407693002/diff/40001/grit/tool/build.py File grit/tool/build.py (right): https://codereview.chromium.org/407693002/diff/40001/grit/tool/build.py#newcode409 grit/tool/build.py:409: self.output_directory, outputs[0].GetFilename()), depdir) On 2014/07/20 22:30:47, Nico (away) ...
6 years, 5 months ago (2014-07-21 17:01:14 UTC) #3
Nico
lgtm if tests pass ( https://code.google.com/p/grit-i18n/wiki/RegressionTestPlan – `grit.py unit`) https://codereview.chromium.org/407693002/diff/60001/grit/tool/build.py File grit/tool/build.py (right): https://codereview.chromium.org/407693002/diff/60001/grit/tool/build.py#newcode360 grit/tool/build.py:360: ...
6 years, 5 months ago (2014-07-21 18:09:25 UTC) #4
brettw
6 years, 5 months ago (2014-07-21 19:51:53 UTC) #5
https://codereview.chromium.org/407693002/diff/60001/grit/tool/build.py
File grit/tool/build.py (right):

https://codereview.chromium.org/407693002/diff/60001/grit/tool/build.py#newco...
grit/tool/build.py:360: asserted = sorted([os.path.abspath(i) for i in
assert_output_files])
On 2014/07/21 18:09:25, Nico (away) wrote:
> so asserted_output_files is relative to the cwd, but the actual output files
are
> relative to output_directory?

Yes, like all other inputs, they're relative to the current directory.

Powered by Google App Engine
This is Rietveld 408576698