Commit ad912fc2 authored by brettw's avatar brettw Committed by Commit bot

Add chrome driver to the GN build.

BUG=

Review URL: https://codereview.chromium.org/958743003

Cr-Commit-Position: refs/heads/master@{#318272}
parent 1f47db6e
......@@ -32,7 +32,6 @@ group("gyp_all") {
deps = [
":gn_all",
# "//chrome/test:chromedriver_unittests", # TODO(GYP)
# "//components:components_browsertests", # TODO(GYP)
# "//components/nacl:nacl_loader_unittests", # TODO(GYP)
# "//google_apis:google_apis_unittests", # TODO(GYP)
......@@ -61,6 +60,7 @@ group("gn_all") {
"//chrome/test:interactive_ui_tests",
"//chrome/test:sync_integration_tests",
"//chrome/test:unit_tests",
"//chrome/test/chromedriver:chromedriver_unittests",
"//components:components_unittests",
"//content/shell:content_shell",
"//content/test:content_browsertests",
......@@ -306,7 +306,6 @@ if (is_linux) {
group("linux_default_tests") {
testonly = true
deps = [
# chromedriver_unittests TODO(GYP)
# components_browsertests TODO(GYP)
# device_unittests TODO(GYP)
# nacl_loader_unittests TODO(GYP)
......@@ -317,8 +316,9 @@ if (is_linux) {
"//cc:cc_unittests", # PASSES 2/25/2015
"//chrome/test:browser_tests",
"//chrome/test:interactive_ui_tests",
"//chrome/test:sync_integration_tests", # TODO(GYP) multiple crashes.
"//chrome/test:sync_integration_tests", # Crashes for brettw in GN and GYP.
"//chrome/test:unit_tests", # PASSES 2/25/2015
"//chrome/test/chromedriver:chromedriver_unittests", # PASSES 2/25/2015
"//components:components_unittests", # TODO(GYP) multiple crashes.
"//content/test:content_browsertests",
"//content/test:content_unittests", # PASSES 2/25/2015
......
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file loads the chrome_tests variables which is then shared between
# all BUILD.gn files that need it.
chrome_tests_gypi_values = exec_script("//build/gypi_to_gn.py",
[ rebase_path("chrome_tests.gypi") ],
"scope",
[ "chrome_tests.gypi" ])
......@@ -1087,12 +1087,6 @@
'browser/ui/panels/stacked_panel_browsertest.cc',
],
'chrome_automation_client_lib_sources': [
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/embedded_automation_extension.cc',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/embedded_automation_extension.h',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/js.cc',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/js.h',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/user_data_dir.cc',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/user_data_dir.h',
'test/chromedriver/chrome/adb.h',
'test/chromedriver/chrome/adb_impl.cc',
'test/chromedriver/chrome/adb_impl.h',
......@@ -1201,8 +1195,6 @@
'chrome_driver_lib_sources': [
'../third_party/webdriver/atoms.cc',
'../third_party/webdriver/atoms.h',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/version.cc',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/version.h',
'common/chrome_constants.cc',
'common/chrome_constants.h',
'test/chromedriver/alert_commands.cc',
......@@ -1671,6 +1663,7 @@
], # conditions
},
{
# GN version: //chrome/test/chromedriver:automation_client_lib
'target_name': 'automation_client_lib',
'type': 'static_library',
'hard_dependency': 1,
......@@ -1697,9 +1690,16 @@
},
'sources': [
'<@(chrome_automation_client_lib_sources)',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/embedded_automation_extension.cc',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/embedded_automation_extension.h',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/js.cc',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/js.h',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/user_data_dir.cc',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/chrome/user_data_dir.h',
],
'actions': [
{
# GN version: //chrome/test/chromedriver:embed_js_in_cpp
'action_name': 'embed_js_in_cpp',
'inputs': [
'test/chromedriver/cpp_source.py',
......@@ -1729,6 +1729,7 @@
'message': 'Generating sources for embedding js in chromedriver',
},
{
# GN version: //chrome/test/chromedriver:embed_user_data_dir_in_cpp
'action_name': 'embed_user_data_dir_in_cpp',
'inputs': [
'test/chromedriver/cpp_source.py',
......@@ -1750,6 +1751,7 @@
'message': 'Generating sources for embedding user data dir in chromedriver',
},
{
# GN version: //chrome/test/chromedriver:embed_extension_in_cpp
'action_name': 'embed_extension_in_cpp',
'inputs': [
'test/chromedriver/cpp_source.py',
......@@ -1775,6 +1777,7 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
# GN version: //chrome/test/chromedriver:lib
'target_name': 'chromedriver_lib',
'type': 'static_library',
'hard_dependency': 1,
......@@ -1796,9 +1799,12 @@
],
'sources': [
'<@(chrome_driver_lib_sources)',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/version.cc',
'<(SHARED_INTERMEDIATE_DIR)/chrome/test/chromedriver/version.h',
],
'actions': [
{
# GN version: //chrome/test/chromedriver:embed_version_in_cpp
'action_name': 'embed_version_in_cpp',
'inputs': [
'test/chromedriver/cpp_source.py',
......@@ -1836,6 +1842,7 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
# GN version: //chrome/test/chromedriver
'target_name': 'chromedriver',
'type': 'executable',
'dependencies': [
......@@ -1851,6 +1858,7 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
# GN version: //chrome/test/chromedriver:chromedriver_unittests
'target_name': 'chromedriver_unittests',
'type': 'executable',
'dependencies': [
......@@ -1876,6 +1884,7 @@
# ChromeDriver tests that aren't run on the main buildbot. Available
# as an optional test type on trybots.
{
# GN version: //chrome/test/chromedriver:chromedriver_tests
'target_name': 'chromedriver_tests',
'type': 'executable',
'dependencies': [
......
This diff is collapsed.
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/ui.gni")
import("//chrome/chrome_tests.gni")
import("//testing/test.gni")
# GYP version: chrome/chrome_tests.gypi:automation_client_lib
# (embed_js_in_cpp action)
action("embed_js_in_cpp") {
script = "embed_js_in_cpp.py"
js_files = [
"js/add_cookie.js",
"js/call_function.js",
"js/execute_async_script.js",
"js/focus.js",
"js/get_element_region.js",
"js/is_option_element_toggleable.js",
]
inputs = [ "cpp_source.py" ] + js_files
outputs = [
"$target_gen_dir/chrome/js.cc",
"$target_gen_dir/chrome/js.h",
]
args = [
"--directory",
rebase_path("$target_gen_dir/chrome", root_build_dir),
]
args += rebase_path(js_files, root_build_dir)
}
# GYP version: chrome/chrome_tests.gypi:automation_client_lib
# (embed_user_data_dir_in_cpp action)
action("embed_user_data_dir_in_cpp") {
script = "embed_user_data_dir_in_cpp.py"
files = [
"chrome/preferences.txt",
"chrome/local_state.txt",
]
inputs = [ "cpp_source.py" ] + files
outputs = [
"$target_gen_dir/chrome/user_data_dir.cc",
"$target_gen_dir/chrome/user_data_dir.h",
]
args = [
"--directory",
rebase_path("$target_gen_dir/chrome", root_build_dir),
]
args += rebase_path(files, root_build_dir)
}
# GYP version: chrome/chrome_tests.gypi:automation_client_lib
# (embed_extension_in_cpp action)
action("embed_extension_in_cpp") {
script = "embed_extension_in_cpp.py"
files = [
"extension/background.js",
"extension/manifest.json",
]
inputs = [ "cpp_source.py" ] + files
outputs = [
"$target_gen_dir/chrome/embedded_automation_extension.cc",
"$target_gen_dir/chrome/embedded_automation_extension.h",
]
args = [
"--directory",
rebase_path("$target_gen_dir/chrome", root_build_dir),
]
args += rebase_path(files, root_build_dir)
}
# GYP version: chrome/chrome_tests.gypi:automation_client_lib
source_set("automation_client_lib") {
sources =
rebase_path(chrome_tests_gypi_values.chrome_automation_client_lib_sources,
".",
"//chrome")
# Also compile the generated files.
sources += get_target_outputs(":embed_extension_in_cpp")
sources += get_target_outputs(":embed_js_in_cpp")
sources += get_target_outputs(":embed_user_data_dir_in_cpp")
deps = [
":embed_js_in_cpp",
":embed_user_data_dir_in_cpp",
"//base",
"//base/third_party/dynamic_annotations",
"//net",
"//third_party/zlib:zip",
"//third_party/zlib:minizip",
"//ui/accessibility:ax_gen",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
"//url",
]
}
# GYP version: chrome/chrome_tests.gypi:chromedriver_lib
# (embed_version_in_cpp action)
action("embed_version_in_cpp") {
script = "embed_version_in_cpp.py"
inputs = [
"cpp_source.py",
"VERSION",
]
outputs = [
"$target_gen_dir/version.cc",
"$target_gen_dir/version.h",
]
args = [
"--version-file",
rebase_path("VERSION", root_build_dir),
"--directory",
rebase_path(target_gen_dir, root_build_dir),
]
}
# GYP version: chrome/chrome_tests.gypi:chromedriver_lib
source_set("lib") {
sources = rebase_path(chrome_tests_gypi_values.chrome_driver_lib_sources,
".",
"//chrome")
# Also compile the generated version files.
sources += get_target_outputs(":embed_version_in_cpp")
# These aren't automatically filtered out.
if (!use_x11) {
sources -= [ "keycode_text_conversion_x.cc" ]
}
if (!use_ozone) {
sources -= [ "keycode_text_conversion_ozone.cc" ]
}
deps = [
":automation_client_lib",
":embed_version_in_cpp",
"//base",
"//base/third_party/dynamic_annotations",
"//crypto",
"//net",
"//net:http_server",
"//third_party/zlib",
"//ui/base",
"//ui/events:events_base",
"//ui/gfx",
"//ui/gfx/geometry",
]
if (use_x11) {
configs += [ "//build/config/linux:x11" ]
deps += [ "//ui/gfx/x" ]
}
}
executable("chromedriver") {
sources = [
"server/chromedriver_server.cc",
]
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":lib",
]
}
test("chromedriver_unittests") {
sources =
rebase_path(chrome_tests_gypi_values.chrome_driver_unittests_sources,
".",
"//chrome")
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":lib",
"//base",
"//base/test:run_all_unittests",
"//net",
"//net:http_server",
"//testing/gtest",
"//ui/base",
"//ui/gfx",
"//ui/gfx/geometry",
]
}
# ChromeDriver tests that aren't run on the main buildbot. Available as an
# optional test type on trybots.
test("chromedriver_tests") {
sources = rebase_path(chrome_tests_gypi_values.chrome_driver_tests_sources,
".",
"//chrome")
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":lib",
"//base",
"//base/test:run_all_unittests",
"//net",
"//net:http_server",
"//net:test_support",
"//testing/gtest",
"//url",
]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment