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

Side by Side Diff: third_party/WebKit/Source/devtools/BUILD.gn

Issue 2262743002: DevTools: Run devtools tests in release mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pull from master Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//third_party/WebKit/Source/core/core.gni") 6 import("//third_party/WebKit/Source/core/core.gni")
7 7
8 devtools_embedder_scripts = [ 8 devtools_embedder_scripts = [
9 "front_end/devtools.js", 9 "front_end/devtools.js",
10 "front_end/Tests.js", 10 "front_end/Tests.js",
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 devtools_core_files + devtools_module_json_files + 853 devtools_core_files + devtools_module_json_files +
854 devtools_modules_js_files + devtools_acorn_files 854 devtools_modules_js_files + devtools_acorn_files
855 855
856 resources_out_dir = "$root_out_dir/resources/inspector" 856 resources_out_dir = "$root_out_dir/resources/inspector"
857 857
858 generated_scripts = [ 858 generated_scripts = [
859 "$resources_out_dir/InspectorBackendCommands.js", 859 "$resources_out_dir/InspectorBackendCommands.js",
860 "$resources_out_dir/SupportedCSSProperties.js", 860 "$resources_out_dir/SupportedCSSProperties.js",
861 ] 861 ]
862 862
863 generated_entry_files = [
864 "$resources_out_dir/inspector.html",
865 "$resources_out_dir/inspector.js",
866 "$resources_out_dir/toolbox.html",
867 "$resources_out_dir/toolbox.js",
868 ]
869
870 generated_workers = [
871 "$resources_out_dir/formatter_worker.js",
872 "$resources_out_dir/heap_snapshot_worker.js",
873 "$resources_out_dir/temp_storage_shared_worker.js",
874 ]
875
876 generated_bundled_modules = [
877 "$resources_out_dir/animation/animation_module.js",
878 "$resources_out_dir/audits/audits_module.js",
879 "$resources_out_dir/components_lazy/components_lazy_module.js",
880 "$resources_out_dir/console/console_module.js",
881 "$resources_out_dir/devices/devices_module.js",
882 "$resources_out_dir/diff/diff_module.js",
883 "$resources_out_dir/elements/elements_module.js",
884 "$resources_out_dir/es_tree/es_tree_module.js",
885 "$resources_out_dir/layers/layers_module.js",
886 "$resources_out_dir/network/network_module.js",
887 "$resources_out_dir/profiler/profiler_module.js",
888 "$resources_out_dir/resources/resources_module.js",
889 "$resources_out_dir/sass/sass_module.js",
890 "$resources_out_dir/security/security_module.js",
891 "$resources_out_dir/settings/settings_module.js",
892 "$resources_out_dir/snippets/snippets_module.js",
893 "$resources_out_dir/source_frame/source_frame_module.js",
894 "$resources_out_dir/sources/sources_module.js",
895 "$resources_out_dir/text_editor/text_editor_module.js",
896 "$resources_out_dir/timeline_model/timeline_model_module.js",
897 "$resources_out_dir/timeline/timeline_module.js",
898 "$resources_out_dir/ui_lazy/ui_lazy_module.js",
899 ]
900
901 generated_remote_modules = [
902 "$resources_out_dir/accessibility/accessibility_module.js",
903 "$resources_out_dir/cm_modes/cm_modes_module.js",
904 "$resources_out_dir/emulated_devices/emulated_devices_module.js",
905 "$resources_out_dir/gonzales/gonzales_module.js",
906 "$resources_out_dir/screencast/screencast_module.js",
907 ]
908
863 #------------------------------------------------------------------------------- 909 #-------------------------------------------------------------------------------
864 910
865 visibility = [ "//third_party/WebKit/*" ] 911 visibility = [ "//third_party/WebKit/*" ]
866 912
867 group("devtools_frontend_resources") { 913 group("devtools_frontend_resources") {
868 public_deps = [ 914 public_deps = [
869 ":build_applications", 915 ":build_release_devtools",
870 ":copy_embedder_scripts", 916 ":copy_embedder_scripts",
871 ":copy_emulated_devices_images", 917 ":copy_emulated_devices_images",
872 ":copy_inspector_images", 918 ":copy_inspector_images",
873 ":devtools_extension_api", 919 ":devtools_extension_api",
874 ":frontend_protocol_sources", 920 ":frontend_protocol_sources",
875 ":supported_css_properties", 921 ":supported_css_properties",
876 ] 922 ]
923 if (debug_devtools) {
924 public_deps += [ ":build_debug_devtools" ]
925 }
877 } 926 }
878 927
879 copy("copy_embedder_scripts") { 928 copy("copy_embedder_scripts") {
880 sources = devtools_embedder_scripts 929 sources = devtools_embedder_scripts
881 outputs = [ 930 outputs = [
882 "$resources_out_dir/{{source_file_part}}", 931 "$resources_out_dir/{{source_file_part}}",
883 ] 932 ]
884 } 933 }
885 934
886 copy("copy_inspector_images") { 935 copy("copy_inspector_images") {
(...skipping 12 matching lines...) Expand all
899 948
900 action("generate_devtools_grd") { 949 action("generate_devtools_grd") {
901 script = "scripts/generate_devtools_grd.py" 950 script = "scripts/generate_devtools_grd.py"
902 951
903 deps = [ 952 deps = [
904 ":devtools_frontend_resources", 953 ":devtools_frontend_resources",
905 ] 954 ]
906 inputs = devtools_image_files + all_devtools_files 955 inputs = devtools_image_files + all_devtools_files
907 inputs += devtools_embedder_scripts 956 inputs += devtools_embedder_scripts
908 957
909 if (debug_devtools) { 958 generated_files =
910 # Debug: all files are picked as-is. 959 generated_entry_files + generated_workers + generated_bundled_modules +
911 generated_files = generated_scripts + [ 960 [ "$resources_out_dir/devtools_extension_api.js" ]
912 "$resources_out_dir/inspector.html",
913 "$resources_out_dir/toolbox.html",
914 ]
915
916 # Use a response file since the static files can be too long for the
917 # command line. The args here will be added to the command line.
918 static_files = all_devtools_files + [ "front_end/Runtime.js" ]
919 response_file_contents = rebase_path(static_files, root_build_dir)
920 static_files_args = [
921 "--static_files_args",
922 "{{response_file_name}}",
923 ]
924 } else {
925 # Release: pick compiled non-remote modules and concatenated app files.
926 generated_files = [
927 "$resources_out_dir/inspector.html",
928 "$resources_out_dir/inspector.js",
929 "$resources_out_dir/toolbox.html",
930 "$resources_out_dir/toolbox.js",
931 "$resources_out_dir/formatter_worker.js",
932 "$resources_out_dir/heap_snapshot_worker.js",
933 "$resources_out_dir/temp_storage_shared_worker.js",
934 "$resources_out_dir/audits/audits_module.js",
935 "$resources_out_dir/animation/animation_module.js",
936 "$resources_out_dir/components_lazy/components_lazy_module.js",
937 "$resources_out_dir/console/console_module.js",
938 "$resources_out_dir/devices/devices_module.js",
939 "$resources_out_dir/diff/diff_module.js",
940 "$resources_out_dir/elements/elements_module.js",
941 "$resources_out_dir/es_tree/es_tree_module.js",
942 "$resources_out_dir/layers/layers_module.js",
943 "$resources_out_dir/network/network_module.js",
944 "$resources_out_dir/profiler/profiler_module.js",
945 "$resources_out_dir/resources/resources_module.js",
946 "$resources_out_dir/sass/sass_module.js",
947 "$resources_out_dir/security/security_module.js",
948 "$resources_out_dir/settings/settings_module.js",
949 "$resources_out_dir/snippets/snippets_module.js",
950 "$resources_out_dir/source_frame/source_frame_module.js",
951 "$resources_out_dir/sources/sources_module.js",
952 "$resources_out_dir/text_editor/text_editor_module.js",
953 "$resources_out_dir/timeline_model/timeline_model_module.js",
954 "$resources_out_dir/timeline/timeline_module.js",
955 "$resources_out_dir/ui_lazy/ui_lazy_module.js",
956 "$resources_out_dir/devtools_extension_api.js",
957 ]
958 static_files_args = [] # Nothing needed for this
959 }
960 961
961 images_path = "front_end/Images" 962 images_path = "front_end/Images"
962 963
963 inputs += generated_files 964 inputs += generated_files
964 965
965 outfile = "$root_gen_dir/devtools/devtools_resources.grd" 966 outfile = "$root_gen_dir/devtools/devtools_resources.grd"
966 outputs = [ 967 outputs = [
967 outfile, 968 outfile,
968 ] 969 ]
969 970
970 relative_path_dirs = [ 971 relative_path_dirs = [
971 resources_out_dir, 972 resources_out_dir,
972 "front_end", 973 "front_end",
973 ] 974 ]
974 975
975 args = rebase_path(generated_files, root_build_dir) + 976 args = rebase_path(generated_files, root_build_dir) +
976 rebase_path(generated_files, root_build_dir) + 977 rebase_path(generated_files, root_build_dir) +
977 rebase_path(devtools_embedder_scripts, root_build_dir) + 978 rebase_path(devtools_embedder_scripts, root_build_dir) +
978 static_files_args + [ "--relative_path_dirs" ] + 979 [ "--relative_path_dirs" ] +
979 rebase_path(relative_path_dirs, root_build_dir) + 980 rebase_path(relative_path_dirs, root_build_dir) +
980 [ 981 [
981 "--images", 982 "--images",
982 rebase_path(images_path, root_build_dir), 983 rebase_path(images_path, root_build_dir),
983 "--output", 984 "--output",
984 rebase_path(outfile, root_build_dir), 985 rebase_path(outfile, root_build_dir),
985 ] 986 ]
986 } 987 }
987 988
988 action("devtools_extension_api") { 989 action("devtools_extension_api") {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 outputs = [ 1024 outputs = [
1024 "$resources_out_dir/InspectorBackendCommands.js", 1025 "$resources_out_dir/InspectorBackendCommands.js",
1025 ] 1026 ]
1026 1027
1027 args = rebase_path(inputs, root_build_dir) + [ 1028 args = rebase_path(inputs, root_build_dir) + [
1028 "--output_js_dir", 1029 "--output_js_dir",
1029 rebase_path(resources_out_dir, root_build_dir), 1030 rebase_path(resources_out_dir, root_build_dir),
1030 ] 1031 ]
1031 } 1032 }
1032 1033
1033 action("build_applications") { 1034 action("build_release_devtools") {
1034 script = "scripts/build_applications.py" 1035 script = "scripts/build_applications.py"
1036
1037 deps = [
1038 ":frontend_protocol_sources",
1039 ":supported_css_properties",
1040 ]
1041
1035 helper_scripts = [ 1042 helper_scripts = [
1036 "scripts/modular_build.py", 1043 "scripts/modular_build.py",
1037 "scripts/concatenate_application_code.py", 1044 "scripts/concatenate_application_code.py",
1038 "scripts/rjsmin.py", 1045 "scripts/rjsmin.py",
1039 ] 1046 ]
1040 1047
1041 inputs = helper_scripts + all_devtools_files + generated_scripts + [ 1048 inputs = helper_scripts + all_devtools_files + generated_scripts + [
1042 "front_end/inspector.html", 1049 "front_end/inspector.html",
1043 "front_end/toolbox.html", 1050 "front_end/toolbox.html",
1044 ] 1051 ]
1045 1052
1046 outputs = [ 1053 outputs = generated_entry_files + generated_workers +
1047 "$resources_out_dir/inspector.html", 1054 generated_bundled_modules + generated_remote_modules
1048 "$resources_out_dir/toolbox.html",
1049 ]
1050 1055
1051 deps = [ 1056 debug_mode = "0"
1052 ":frontend_protocol_sources",
1053 ":supported_css_properties",
1054 ]
1055
1056 if (debug_devtools) {
1057 deps += [ ":copy_debug_non_modules" ]
1058
1059 debug_mode = "1"
1060 } else {
1061 outputs += [
1062 "$resources_out_dir/inspector.js",
1063 "$resources_out_dir/toolbox.js",
1064 "$resources_out_dir/formatter_worker.js",
1065 "$resources_out_dir/heap_snapshot_worker.js",
1066 "$resources_out_dir/temp_storage_shared_worker.js",
1067 "$resources_out_dir/accessibility/accessibility_module.js",
1068 "$resources_out_dir/animation/animation_module.js",
1069 "$resources_out_dir/audits/audits_module.js",
1070 "$resources_out_dir/cm_modes/cm_modes_module.js",
1071 "$resources_out_dir/components_lazy/components_lazy_module.js",
1072 "$resources_out_dir/console/console_module.js",
1073 "$resources_out_dir/devices/devices_module.js",
1074 "$resources_out_dir/diff/diff_module.js",
1075 "$resources_out_dir/elements/elements_module.js",
1076 "$resources_out_dir/emulated_devices/emulated_devices_module.js",
1077 "$resources_out_dir/es_tree/es_tree_module.js",
1078 "$resources_out_dir/gonzales/gonzales_module.js",
1079 "$resources_out_dir/layers/layers_module.js",
1080 "$resources_out_dir/network/network_module.js",
1081 "$resources_out_dir/profiler/profiler_module.js",
1082 "$resources_out_dir/resources/resources_module.js",
1083 "$resources_out_dir/sass/sass_module.js",
1084 "$resources_out_dir/screencast/screencast_module.js",
1085 "$resources_out_dir/security/security_module.js",
1086 "$resources_out_dir/settings/settings_module.js",
1087 "$resources_out_dir/snippets/snippets_module.js",
1088 "$resources_out_dir/source_frame/source_frame_module.js",
1089 "$resources_out_dir/sources/sources_module.js",
1090 "$resources_out_dir/text_editor/text_editor_module.js",
1091 "$resources_out_dir/timeline_model/timeline_model_module.js",
1092 "$resources_out_dir/timeline/timeline_module.js",
1093 "$resources_out_dir/ui_lazy/ui_lazy_module.js",
1094 ]
1095
1096 debug_mode = "0"
1097 }
1098 1057
1099 args = [ 1058 args = [
1100 "inspector", 1059 "inspector",
1101 "toolbox", 1060 "toolbox",
1102 "formatter_worker", 1061 "formatter_worker",
1103 "heap_snapshot_worker", 1062 "heap_snapshot_worker",
1104 "temp_storage_shared_worker", 1063 "temp_storage_shared_worker",
1105 "--input_path", 1064 "--input_path",
1106 rebase_path("front_end", root_build_dir), 1065 rebase_path("front_end", root_build_dir),
1107 "--output_path", 1066 "--output_path",
1108 rebase_path(resources_out_dir, root_build_dir), 1067 rebase_path(resources_out_dir, root_build_dir),
1109 "--debug", 1068 "--debug",
1110 debug_mode, 1069 debug_mode,
1111 ] 1070 ]
1112 } 1071 }
1113 1072
1114 if (debug_devtools) { 1073 if (debug_devtools) {
1115 # Debug: copy non-module directories and core into resources_out_dir as-is. 1074 resources_out_debug_dir = "$root_out_dir/resources/inspector/debug"
1116 group("copy_debug_non_modules") { 1075
1076 action("build_debug_devtools") {
1077 script = "scripts/build_applications.py"
1078
1079 deps = [
1080 ":copy_debug_files",
1081 ]
1082
1083 inputs = all_devtools_files + [
1084 "front_end/inspector.html",
1085 "front_end/toolbox.html",
1086 ]
1087
1088 outputs = [
1089 "$resources_out_debug_dir/inspector.html",
1090 "$resources_out_debug_dir/toolbox.html",
1091 ]
1092
1093 debug_mode = "1"
1094
1095 args = [
1096 "inspector",
1097 "toolbox",
1098 "formatter_worker",
1099 "heap_snapshot_worker",
1100 "temp_storage_shared_worker",
1101 "--input_path",
1102 rebase_path("front_end", root_build_dir),
1103 "--output_path",
1104 rebase_path(resources_out_debug_dir, root_build_dir),
1105 "--debug",
1106 debug_mode,
1107 ]
1108 }
1109
1110 group("copy_debug_files") {
1117 public_deps = [ 1111 public_deps = [
1118 ":copy_acorn_js_files", 1112 ":copy_acorn_js_files",
1119 ":copy_codemirror_files", 1113 ":copy_codemirror_files",
1114 ":copy_emulated_devices_images_debug",
1115 ":copy_generated_scripts",
1116 ":copy_inspector_images_debug",
1120 ":copy_runtime_core", 1117 ":copy_runtime_core",
1121 ] 1118 ]
1122 } 1119 }
1123 1120
1124 copy("copy_runtime_core") { 1121 copy("copy_runtime_core") {
1125 sources = devtools_core_base_files 1122 sources = devtools_core_base_files
1126 outputs = [ 1123 outputs = [
1127 "$resources_out_dir//{{source_file_part}}", 1124 "$resources_out_debug_dir/{{source_file_part}}",
1128 ] 1125 ]
1129 } 1126 }
1130 1127
1131 copy("copy_acorn_js_files") { 1128 copy("copy_acorn_js_files") {
1132 sources = devtools_acorn_files 1129 sources = devtools_acorn_files
1133 outputs = [ 1130 outputs = [
1134 "$resources_out_dir/acorn/{{source_file_part}}", 1131 "$resources_out_debug_dir/acorn/{{source_file_part}}",
1135 ] 1132 ]
1136 } 1133 }
1137 1134
1138 copy("copy_codemirror_files") { 1135 copy("copy_codemirror_files") {
1139 sources = devtools_cm_js_files + devtools_cm_css_files 1136 sources = devtools_cm_js_files + devtools_cm_css_files
1140 outputs = [ 1137 outputs = [
1141 "$resources_out_dir/cm/{{source_file_part}}", 1138 "$resources_out_debug_dir/cm/{{source_file_part}}",
1139 ]
1140 }
1141
1142 copy("copy_generated_scripts") {
1143 deps = [
1144 ":frontend_protocol_sources",
1145 ":supported_css_properties",
1146 ]
1147 sources = generated_scripts
1148 outputs = [
1149 "$resources_out_debug_dir/{{source_file_part}}",
1150 ]
1151 }
1152 copy("copy_inspector_images_debug") {
1153 sources = devtools_image_files
1154 outputs = [
1155 "$resources_out_debug_dir/Images/{{source_file_part}}",
1156 ]
1157 }
1158
1159 copy("copy_emulated_devices_images_debug") {
1160 sources = devtools_emulated_devices_images
1161 outputs = [
1162 "$resources_out_debug_dir/emulated_devices/{{source_file_part}}",
1142 ] 1163 ]
1143 } 1164 }
1144 } 1165 }
OLDNEW
« no previous file with comments | « content/shell/common/layout_test/layout_test_switches.cc ('k') | third_party/WebKit/Source/devtools/front_end/Runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698