Index: remoting/webapp/BUILD.gn |
diff --git a/remoting/webapp/BUILD.gn b/remoting/webapp/BUILD.gn |
index 78620a8d7c0566101b9edb6c6254e047d4ab904a..9b1a78028a49a1ba59c1728eb3c247d8068a0437 100644 |
--- a/remoting/webapp/BUILD.gn |
+++ b/remoting/webapp/BUILD.gn |
@@ -125,11 +125,22 @@ action("build_unittest") { |
outputs = [ |
"$remoting_unit_test_out_dir/unittests.html", |
] |
- args = rebase_path(outputs, root_build_dir) + [ |
- rebase_path(remoting_webapp_unittests_template_main, root_build_dir), |
- "--exclude-js", |
- ] + rebase_path(remoting_webapp_unittests_exclude_js_files, |
- root_build_dir) + [ "--js" ] + |
- rebase_path(remoting_webapp_unittests_all_js_files, root_build_dir) + |
- [ "--instrument-js" ] + rebase_path(webapp_js_files, root_build_dir) |
+ |
+ # Create a file that contains a list of all the JavaScript files needed |
+ # to build the unit test page. This is needed to avoid problems on platforms |
+ # that limit the size of a command line. |
+ file_list = "$target_gen_dir/remoting_webapp_unittest_files.txt" |
+ files = rebase_path(remoting_webapp_unittests_all_js_files, root_build_dir) |
+ write_file(file_list, files) |
+ |
+ args = |
+ rebase_path(outputs, root_build_dir) + [ |
+ rebase_path(remoting_webapp_unittests_template_main, root_build_dir), |
+ "--exclude-js", |
+ ] + |
+ rebase_path(remoting_webapp_unittests_exclude_js_files, root_build_dir) + |
+ [ |
+ "--js-list-file", |
+ rebase_path(file_list, root_build_dir), |
+ ] + [ "--instrument-js" ] + rebase_path(webapp_js_files, root_build_dir) |
} |