2020-05-19 15:08:49 -04:00
|
|
|
# Copyright Google LLC
|
2019-11-01 14:17:10 -04:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
#
|
2020-04-24 16:14:28 -04:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
2019-11-01 14:17:10 -04:00
|
|
|
load("@io_bazel_rules_webtesting//web:web.bzl", "browser", "web_test_archive")
|
|
|
|
|
|
|
|
# Override of chromium web_test_archive so that the archive is selected based on platform
|
|
|
|
web_test_archive(
|
|
|
|
name = "chromium_archive",
|
|
|
|
testonly = True,
|
|
|
|
archive = select({
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:linux": "@org_chromium_chromium_amd64//file",
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:mac": "@org_chromium_chromium_macos//file",
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:windows": "@org_chromium_chromium_windows//file",
|
|
|
|
}),
|
|
|
|
extract = "build",
|
|
|
|
named_files = select({
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:linux": {"CHROMIUM": "chrome-linux/chrome"},
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:mac": {"CHROMIUM": "chrome-mac/Chromium.app/Contents/MacOS/chromium"},
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:windows": {"CHROMIUM": "chrome-win/chrome.exe"},
|
|
|
|
}),
|
2020-04-24 16:14:28 -04:00
|
|
|
visibility = ["//dev-infra/benchmark/browsers:__subpackages__"],
|
2019-11-01 14:17:10 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
# Override of chromedriver web_test_archive so that the archive is selected based on platform
|
|
|
|
web_test_archive(
|
|
|
|
name = "chromedriver_archive",
|
|
|
|
testonly = True,
|
|
|
|
archive = select({
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:linux": "@org_chromium_chromedriver_amd64//file",
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:mac": "@org_chromium_chromedriver_macos//file",
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:windows": "@org_chromium_chromedriver_windows//file",
|
|
|
|
}),
|
|
|
|
extract = "build",
|
|
|
|
named_files = select({
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:linux": {
|
|
|
|
"CHROMEDRIVER": "chromedriver_linux64/chromedriver",
|
|
|
|
},
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:mac": {
|
|
|
|
"CHROMEDRIVER": "chromedriver_mac64/chromedriver",
|
|
|
|
},
|
|
|
|
"@io_bazel_rules_webtesting//common/conditions:windows": {
|
|
|
|
"CHROMEDRIVER": "chromedriver_win32/chromedriver.exe",
|
|
|
|
},
|
|
|
|
}),
|
2020-04-24 16:14:28 -04:00
|
|
|
visibility = ["//dev-infra/benchmark/browsers:__subpackages__"],
|
2019-11-01 14:17:10 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
browser(
|
|
|
|
name = "chromium",
|
|
|
|
metadata = "chromium.json",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
":chromedriver_archive",
|
|
|
|
":chromium_archive",
|
|
|
|
"@io_bazel_rules_webtesting//go/wsl",
|
|
|
|
],
|
|
|
|
)
|
2020-04-24 16:14:28 -04:00
|
|
|
|
|
|
|
# Make source files available for distribution via pkg_npm
|
|
|
|
filegroup(
|
|
|
|
name = "files",
|
|
|
|
srcs = glob(["*"]),
|
|
|
|
)
|