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

Unified Diff: chrome/test/base/js2gtest.gni

Issue 1296363005: Sync GN unit tests with GYP, add checking script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add gtest files to data Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/BUILD.gn ('k') | tools/gn/bin/compare_test_lists.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/js2gtest.gni
diff --git a/chrome/test/base/js2gtest.gni b/chrome/test/base/js2gtest.gni
index 4b1dc5f5dbc74722da2bdd36345e2a1b118cb6d2..213e7b5ba5580de50fbd37715805ba3927432dc0 100644
--- a/chrome/test/base/js2gtest.gni
+++ b/chrome/test/base/js2gtest.gni
@@ -11,6 +11,9 @@ template("js2gtest") {
action_name = target_name + "_action"
source_set_name = target_name
+ # The mapping from sources to the copied version.
+ copied_source_pattern = "$root_out_dir/test_data/{{source_root_relative_dir}}/{{source_file_part}}"
+
action_foreach(action_name) {
testonly = true
visibility = [ ":$source_set_name" ]
@@ -33,10 +36,14 @@ template("js2gtest") {
inputs += [ invoker.deps_js ]
}
+ # Outputs. The script will copy the source files to the output directory,
+ # which then must be treated as runtime data. The generated .cc file isn't
+ # data, it will be compiled in a step below.
outputs = [
"$target_gen_dir/{{source_name_part}}-gen.cc",
- "$root_out_dir/test_data/{{source_root_relative_dir}}/{{source_file_part}}",
+ copied_source_pattern,
]
+ data = process_file_template(sources, [ copied_source_pattern ])
args = []
if (defined(invoker.deps_js)) {
@@ -75,7 +82,7 @@ template("js2gtest") {
visibility = [ ":$source_set_name" ]
sources = invoker.extra_js_files
outputs = [
- "$root_out_dir/test_data/{{source_root_relative_dir}}/{{source_file_part}}",
+ copied_source_pattern,
]
}
}
« no previous file with comments | « chrome/test/BUILD.gn ('k') | tools/gn/bin/compare_test_lists.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698