Skip to content

Commit

Permalink
[WPT/common/security-features] Do not generate debug-only files
Browse files Browse the repository at this point in the history
this CL suppresses generation of debug-only files
in release target, to avoid unintended addition of such files
into git repositories.

Bug: 906850
Change-Id: I55dac746fb7f2690f50d8a40a8c97af51615db03
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107337
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751232}
  • Loading branch information
hiroshige-g authored and chromium-wpt-export-bot committed Mar 18, 2020
1 parent d18df87 commit f2cc9f3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions common/security-features/tools/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,15 @@ def generate_test_source_files(spec_directory, test_helper_filenames,
test_expansion_schema = spec_json['test_expansion_schema']
specification = spec_json['specification']

spec_json_js_template = util.get_template('spec_json.js.template')
util.write_file(
os.path.join(spec_directory, "generic", "spec_json.js"),
spec_json_js_template % {'spec_json': json.dumps(spec_json)})

util.write_file(
os.path.join(spec_directory, "generic", "debug-output.spec.src.json"),
json.dumps(spec_json, indent=2, separators=(',', ': ')))
if target == "debug":
spec_json_js_template = util.get_template('spec_json.js.template')
util.write_file(
os.path.join(spec_directory, "generic", "spec_json.js"),
spec_json_js_template % {'spec_json': json.dumps(spec_json)})
util.write_file(
os.path.join(spec_directory, "generic",
"debug-output.spec.src.json"),
json.dumps(spec_json, indent=2, separators=(',', ': ')))

# Choose a debug/release template depending on the target.
html_template = "test.%s.html.template" % target
Expand Down

0 comments on commit f2cc9f3

Please sign in to comment.