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

Side by Side Diff: chrome/chrome_tests.gypi

Issue 304793002: Support automatically resolving dependencies in javascript tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: rebase on top of Dominic's submitted test. Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 'includes': [ 5 'includes': [
6 'js_unittest_vars.gypi', 6 'js_unittest_vars.gypi',
7 ], 7 ],
8 'variables': {
9 'chromevox_deps_js_file': '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resourc es/chromeos/chromevox/deps.js',
dmazzoni 2014/05/30 17:03:42 I think it'd make sense to move these into a new g
10 },
8 'targets': [ 11 'targets': [
9 { 12 {
10 'target_name': 'interactive_ui_tests', 13 'target_name': 'interactive_ui_tests',
11 'type': 'executable', 14 'type': 'executable',
12 'dependencies': [ 15 'dependencies': [
13 '../google_apis/google_apis.gyp:google_apis_test_support', 16 '../google_apis/google_apis.gyp:google_apis_test_support',
14 '../net/net.gyp:net', 17 '../net/net.gyp:net',
15 '../net/net.gyp:net_resources', 18 '../net/net.gyp:net_resources',
16 '../net/net.gyp:net_test_support', 19 '../net/net.gyp:net_test_support',
17 '../ppapi/ppapi_internal.gyp:ppapi_tests', 20 '../ppapi/ppapi_internal.gyp:ppapi_tests',
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 { 788 {
786 # Executable that runs each browser test in a new process. 789 # Executable that runs each browser test in a new process.
787 'target_name': 'browser_tests', 790 'target_name': 'browser_tests',
788 'type': 'executable', 791 'type': 'executable',
789 'dependencies': [ 792 'dependencies': [
790 'browser', 793 'browser',
791 'chrome_resources.gyp:chrome_resources', 794 'chrome_resources.gyp:chrome_resources',
792 'chrome_resources.gyp:chrome_strings', 795 'chrome_resources.gyp:chrome_strings',
793 'chrome_resources.gyp:packed_extra_resources', 796 'chrome_resources.gyp:packed_extra_resources',
794 'chrome_resources.gyp:packed_resources', 797 'chrome_resources.gyp:packed_resources',
798 'chromevox_generated_browser_tests',
795 'common/extensions/api/api.gyp:chrome_api', 799 'common/extensions/api/api.gyp:chrome_api',
796 'renderer', 800 'renderer',
797 'test/perf/perf_test.gyp:*', 801 'test/perf/perf_test.gyp:*',
798 'test_support_common', 802 'test_support_common',
799 'test_support_sync_integration', 803 'test_support_sync_integration',
800 '../apps/common/api/api.gyp:apps_api', 804 '../apps/common/api/api.gyp:apps_api',
801 '../base/base.gyp:base', 805 '../base/base.gyp:base',
802 '../base/base.gyp:base_i18n', 806 '../base/base.gyp:base_i18n',
803 '../base/base.gyp:test_support_base', 807 '../base/base.gyp:test_support_base',
804 '../components/components.gyp:autofill_content_risk_proto', 808 '../components/components.gyp:autofill_content_risk_proto',
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_test_license_serv er', 844 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_test_license_serv er',
841 ], 845 ],
842 'include_dirs': [ 846 'include_dirs': [
843 '..', 847 '..',
844 '<(SHARED_INTERMEDIATE_DIR)', 848 '<(SHARED_INTERMEDIATE_DIR)',
845 ], 849 ],
846 'defines': [ 850 'defines': [
847 'HAS_OUT_OF_PROC_TEST_RUNNER', 851 'HAS_OUT_OF_PROC_TEST_RUNNER',
848 ], 852 ],
849 'sources': [ 853 'sources': [
854 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/chromeos/chromevox/ common/aria_util_test-gen.cc',
850 '../apps/app_restore_service_browsertest.cc', 855 '../apps/app_restore_service_browsertest.cc',
851 '../apps/app_window_browsertest.cc', 856 '../apps/app_window_browsertest.cc',
852 '../apps/app_shim/app_shim_host_manager_browsertest_mac.mm', 857 '../apps/app_shim/app_shim_host_manager_browsertest_mac.mm',
853 '../apps/app_shim/test/app_shim_host_manager_test_api_mac.cc', 858 '../apps/app_shim/test/app_shim_host_manager_test_api_mac.cc',
854 '../apps/app_shim/test/app_shim_host_manager_test_api_mac.h', 859 '../apps/app_shim/test/app_shim_host_manager_test_api_mac.h',
855 '../apps/load_and_launch_browsertest.cc', 860 '../apps/load_and_launch_browsertest.cc',
856 '../extensions/browser/api/usb/usb_apitest.cc', 861 '../extensions/browser/api/usb/usb_apitest.cc',
857 '../extensions/browser/api/usb/usb_manual_apitest.cc', 862 '../extensions/browser/api/usb/usb_manual_apitest.cc',
858 '../extensions/renderer/script_context_browsertest.cc', 863 '../extensions/renderer/script_context_browsertest.cc',
859 # TODO(blundell): Bring up a components_browsertests target and move 864 # TODO(blundell): Bring up a components_browsertests target and move
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 'browser/renderer_context_menu/render_view_context_menu_browsertest.cc', 1324 'browser/renderer_context_menu/render_view_context_menu_browsertest.cc',
1320 'browser/renderer_context_menu/render_view_context_menu_browsertest_util .cc', 1325 'browser/renderer_context_menu/render_view_context_menu_browsertest_util .cc',
1321 'browser/renderer_context_menu/render_view_context_menu_browsertest_util .h', 1326 'browser/renderer_context_menu/render_view_context_menu_browsertest_util .h',
1322 'browser/renderer_context_menu/render_view_context_menu_test_util.cc', 1327 'browser/renderer_context_menu/render_view_context_menu_test_util.cc',
1323 'browser/renderer_context_menu/render_view_context_menu_test_util.h', 1328 'browser/renderer_context_menu/render_view_context_menu_test_util.h',
1324 'browser/renderer_context_menu/spellchecker_submenu_observer_browsertest .cc', 1329 'browser/renderer_context_menu/spellchecker_submenu_observer_browsertest .cc',
1325 'browser/renderer_context_menu/spelling_menu_observer_browsertest.cc', 1330 'browser/renderer_context_menu/spelling_menu_observer_browsertest.cc',
1326 'browser/renderer_host/render_process_host_chrome_browsertest.cc', 1331 'browser/renderer_host/render_process_host_chrome_browsertest.cc',
1327 'browser/renderer_host/web_cache_manager_browsertest.cc', 1332 'browser/renderer_host/web_cache_manager_browsertest.cc',
1328 'browser/repost_form_warning_browsertest.cc', 1333 'browser/repost_form_warning_browsertest.cc',
1329 'browser/resources/chromeos/chromevox/common/aria_util_test.js',
1330 'browser/safe_browsing/local_safebrowsing_test_server.cc', 1334 'browser/safe_browsing/local_safebrowsing_test_server.cc',
1331 'browser/safe_browsing/safe_browsing_blocking_page_test.cc', 1335 'browser/safe_browsing/safe_browsing_blocking_page_test.cc',
1332 'browser/safe_browsing/safe_browsing_service_browsertest.cc', 1336 'browser/safe_browsing/safe_browsing_service_browsertest.cc',
1333 'browser/safe_browsing/safe_browsing_test.cc', 1337 'browser/safe_browsing/safe_browsing_test.cc',
1334 'browser/search/suggestions/thumbnail_manager_browsertest.cc', 1338 'browser/search/suggestions/thumbnail_manager_browsertest.cc',
1335 'browser/service_process/service_process_control_browsertest.cc', 1339 'browser/service_process/service_process_control_browsertest.cc',
1336 'browser/services/gcm/fake_gcm_profile_service.cc', 1340 'browser/services/gcm/fake_gcm_profile_service.cc',
1337 'browser/services/gcm/fake_gcm_profile_service.h', 1341 'browser/services/gcm/fake_gcm_profile_service.h',
1338 'browser/sessions/better_session_restore_browsertest.cc', 1342 'browser/sessions/better_session_restore_browsertest.cc',
1339 'browser/sessions/persistent_tab_restore_service_browsertest.cc', 1343 'browser/sessions/persistent_tab_restore_service_browsertest.cc',
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 ], 1606 ],
1603 'rules': [ 1607 'rules': [
1604 { 1608 {
1605 'rule_name': 'js2webui', 1609 'rule_name': 'js2webui',
1606 'extension': 'js', 1610 'extension': 'js',
1607 'msvs_external_rule': 1, 1611 'msvs_external_rule': 1,
1608 'inputs': [ 1612 'inputs': [
1609 '<(gypv8sh)', 1613 '<(gypv8sh)',
1610 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)', 1614 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
1611 '<(mock_js)', 1615 '<(mock_js)',
1612 '<(accessibility_audit_js)',
1613 '<(test_api_js)', 1616 '<(test_api_js)',
1614 '<(js2gtest)', 1617 '<(js2gtest)',
1615 ], 1618 ],
1616 'outputs': [ 1619 'outputs': [
1617 '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT) -gen.cc', 1620 '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT) -gen.cc',
1618 '<(PRODUCT_DIR)/test_data/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ ROOT).js', 1621 '<(PRODUCT_DIR)/test_data/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ ROOT).js',
1619 ], 1622 ],
1620 'process_outputs_as_sources': 1, 1623 'process_outputs_as_sources': 1,
1621 'action': [ 1624 'action': [
1622 'python', 1625 'python',
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 '../remoting/remoting.gyp:remoting_webapp', 2039 '../remoting/remoting.gyp:remoting_webapp',
2037 ] 2040 ]
2038 }, { 2041 }, {
2039 'sources/': [ 2042 'sources/': [
2040 ['exclude', '^test/remoting'], 2043 ['exclude', '^test/remoting'],
2041 ], 2044 ],
2042 }], 2045 }],
2043 ], # conditions 2046 ], # conditions
2044 }, # target browser_tests 2047 }, # target browser_tests
2045 { 2048 {
2049 # This library gets included in the browser_tests executable.
2050 # It is separated out because the rule to convert js to C++ is
2051 # different for ChromeVox tests and it is not possible to have conditions
2052 # based on the actual rule input file.
2053 # NOTE: This is not a static library because tests in static libraries
2054 # are stripped by the linker. Therefore, sources mentioned in tihis
David Tseng 2014/05/30 17:08:46 this
2055 # target must have a corresponding -gen.cc source mentioned in the
2056 # browser_tests target above.
2057 'target_name': 'chromevox_generated_browser_tests',
2058 'type': 'none',
2059 'dependencies': [
2060 '../testing/gtest.gyp:gtest',
2061 ],
2062 'defines': [
2063 'HAS_OUT_OF_PROC_TEST_RUNNER',
2064 ],
2065 'include_dirs': [
2066 '..',
2067 '<(SHARED_INTERMEDIATE_DIR)',
2068 ],
2069 'rules': [
2070 {
2071 'rule_name': 'js2webui',
2072 'extension': 'js',
2073 'msvs_external_rule': 1,
2074 'inputs': [
2075 '<(gypv8sh)',
2076 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
2077 '<(mock_js)',
2078 '<(test_api_js)',
2079 '<(js2gtest)',
2080 '<(chromevox_deps_js_file)',
2081 ],
2082 'outputs': [
2083 '<(SHARED_INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPU T_ROOT)-gen.cc',
2084 '<(PRODUCT_DIR)/test_data/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ ROOT).js',
2085 ],
2086 'action': [
2087 'python',
2088 '<(gypv8sh)',
2089 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
2090 '--deps_js', '<(chromevox_deps_js_file)',
2091 '<(mock_js)',
2092 '<(test_api_js)',
2093 '<(js2gtest)',
2094 'webui',
2095 '<(RULE_INPUT_PATH)',
2096 'chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).js',
2097 '<@(_outputs)',
2098 ],
2099 },
2100 ],
2101 'sources': [
2102 'browser/resources/chromeos/chromevox/common/aria_util_test.js',
2103 ],
2104 }, # target chromevox_browser_tests_lib
2105 {
2046 # Executable that runs each perf browser test in a new process. 2106 # Executable that runs each perf browser test in a new process.
2047 'target_name': 'performance_browser_tests', 2107 'target_name': 'performance_browser_tests',
2048 'type': 'executable', 2108 'type': 'executable',
2049 'dependencies': [ 2109 'dependencies': [
2050 'browser', 2110 'browser',
2051 'chrome_resources.gyp:chrome_resources', 2111 'chrome_resources.gyp:chrome_resources',
2052 'chrome_resources.gyp:chrome_strings', 2112 'chrome_resources.gyp:chrome_strings',
2053 'chrome_resources.gyp:packed_extra_resources', 2113 'chrome_resources.gyp:packed_extra_resources',
2054 'chrome_resources.gyp:packed_resources', 2114 'chrome_resources.gyp:packed_resources',
2055 'renderer', 2115 'renderer',
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 ], 2165 ],
2106 'rules': [ 2166 'rules': [
2107 { 2167 {
2108 'rule_name': 'js2webui', 2168 'rule_name': 'js2webui',
2109 'extension': 'js', 2169 'extension': 'js',
2110 'msvs_external_rule': 1, 2170 'msvs_external_rule': 1,
2111 'inputs': [ 2171 'inputs': [
2112 '<(gypv8sh)', 2172 '<(gypv8sh)',
2113 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)', 2173 '<(PRODUCT_DIR)/d8<(EXECUTABLE_SUFFIX)',
2114 '<(mock_js)', 2174 '<(mock_js)',
2115 '<(accessibility_audit_js)',
2116 '<(test_api_js)', 2175 '<(test_api_js)',
2117 '<(js2gtest)', 2176 '<(js2gtest)',
2118 ], 2177 ],
2119 'outputs': [ 2178 'outputs': [
2120 '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT) -gen.cc', 2179 '<(INTERMEDIATE_DIR)/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT) -gen.cc',
2121 '<(PRODUCT_DIR)/test_data/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ ROOT).js', 2180 '<(PRODUCT_DIR)/test_data/chrome/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ ROOT).js',
2122 ], 2181 ],
2123 'process_outputs_as_sources': 1, 2182 'process_outputs_as_sources': 1,
2124 'action': [ 2183 'action': [
2125 'python', 2184 'python',
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2591 'type': 'none', 2650 'type': 'none',
2592 'dependencies': [ 2651 'dependencies': [
2593 '../base/base.gyp:base', 2652 '../base/base.gyp:base',
2594 '../base/base.gyp:run_all_unittests', 2653 '../base/base.gyp:run_all_unittests',
2595 '../testing/gtest.gyp:gtest', 2654 '../testing/gtest.gyp:gtest',
2596 ], 2655 ],
2597 'include_dirs': [ 2656 'include_dirs': [
2598 '..,' 2657 '..,'
2599 ], 2658 ],
2600 }, 2659 },
2660 {
2661 'target_name': 'chromevox_deps_js',
2662 'type': 'none',
2663 'actions': [
2664 {
2665 'action_name': 'deps_js',
2666 'message': 'Generate test ChromeVox deps.js',
2667 'variables': {
2668 'closure_dir': 'third_party/chromevox/third_party/closure-library/cl osure/goog',
2669 'cvox_dir': 'browser/resources/chromeos/chromevox',
2670 'depswriter_path': 'third_party/chromevox/third_party/closure-librar y/closure/bin/build/depswriter.py',
2671 },
2672 'inputs': [
2673 '<!@(python browser/resources/chromeos/chromevox/tools/find_js_files .py <(closure_dir) <(cvox_dir))',
2674 '<(depswriter_path)',
2675 ],
2676 'outputs': [
2677 '<(chromevox_deps_js_file)',
2678 ],
2679 'action': [
2680 'python',
2681 '<(depswriter_path)',
2682 '--root_with_prefix', '<(closure_dir) chrome/<(closure_dir)',
2683 '--root_with_prefix', '<(cvox_dir) chrome/<(cvox_dir)',
2684 '--output_file', '<(chromevox_deps_js_file)',
2685 ],
2686 },
2687 ],
2688 },
2601 ], 2689 ],
2602 'conditions': [ 2690 'conditions': [
2603 ['OS=="mac"', { 2691 ['OS=="mac"', {
2604 'targets': [ 2692 'targets': [
2605 { 2693 {
2606 # This is the mac equivalent of the security_tests target below. It 2694 # This is the mac equivalent of the security_tests target below. It
2607 # generates a framework bundle which bundles tests to be run in a 2695 # generates a framework bundle which bundles tests to be run in a
2608 # renderer process. The test code is built as a framework so it can be 2696 # renderer process. The test code is built as a framework so it can be
2609 # run in the context of a renderer without shipping the code to end 2697 # run in the context of a renderer without shipping the code to end
2610 # users. 2698 # users.
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2994 ['enable_webrtc==1', { 3082 ['enable_webrtc==1', {
2995 'dependencies': [ 3083 'dependencies': [
2996 '../third_party/libjingle/libjingle.gyp:libjingle_webrtc' 3084 '../third_party/libjingle/libjingle.gyp:libjingle_webrtc'
2997 ] 3085 ]
2998 }], 3086 }],
2999 ], 3087 ],
3000 }] 3088 }]
3001 }], 3089 }],
3002 ], # 'conditions' 3090 ], # 'conditions'
3003 } 3091 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698