Skip to content

Commit

Permalink
remove chromedriver dep that was carried over from muon and isn't nee…
Browse files Browse the repository at this point in the history
…ded at all
  • Loading branch information
bridiver authored and mkarolin committed Jul 10, 2019
1 parent 6244a49 commit c7985f8
Show file tree
Hide file tree
Showing 12 changed files with 7 additions and 164 deletions.
50 changes: 5 additions & 45 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -246,33 +246,6 @@ if (!is_mac && !is_android && !is_ios) {
}
}

if (target_cpu == "x86") {
target_arch = "ia32"
} else {
target_arch = target_cpu
}

if (!is_android && !is_ios) {
chromedriver = "chromedriver"
if (is_win) {
chromedriver = "$chromedriver.exe"
}

chromedriver_version = "2.33"

copy("brave_chromedriver_dist_resources") {
sources = [
"$root_out_dir/$chromedriver",
]

outputs = [
"$brave_dist_dir/$chromedriver"
]

deps = [ "//chrome/test/chromedriver:chromedriver" ]
}
}

action("generate_chromium_licenses") {
license_file = "$root_gen_dir/LICENSES.chromium.html"

Expand Down Expand Up @@ -357,28 +330,19 @@ if (!is_android && !is_ios) {
"$brave_dist_dir/{{source_file_part}}"
]
}
}

zip("chromedriver_zip") {
inputs = get_target_outputs(":brave_chromedriver_dist_resources")
inputs += get_target_outputs(":brave_license_dist_resources")
output = "$brave_dist_dir/chromedriver-v$chromedriver_version-$brave_platform-$target_arch.zip"

base_dir = brave_dist_dir

deps = [
"app/$current_os:chromedriver_dist_resources",
":brave_chromedriver_dist_resources",
":brave_license_dist_resources",
]
}
if (target_cpu == "x86") {
target_arch = "ia32"
} else {
target_arch = target_cpu
}

action("create_symbols_dist") {
output = "$brave_dist_dir/$brave_project_name-v$brave_version-$brave_platform-$target_arch-symbols.zip"

script = "//brave/script/create-dist.py"

# inputs = get_target_outputs(":brave_chromedriver_dist_resources")
inputs = get_target_outputs(":brave_license_dist_resources")
dir_inputs = [ "$brave_project_name.breakpad.syms" ]

Expand Down Expand Up @@ -455,10 +419,6 @@ action("create_dist_zips") {
"app/$current_os:dist_resources",
]

if (!is_android && !is_ios) {
deps += [ ":chromedriver_zip" ]
}

if (!is_mac && !is_android && !is_ios) {
deps += [
":brave_dist_resources",
Expand Down
1 change: 0 additions & 1 deletion app/android/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import("//brave/build/config.gni")

group("chromedriver_dist_resources") {}
group("symbol_dist_resources") {}
group("dist_resources") {}

Expand Down
1 change: 0 additions & 1 deletion app/ios/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
group("chromedriver_dist_resources") {}
group("symbol_dist_resources") {}
group("dist_resources") {}
37 changes: 0 additions & 37 deletions app/linux/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,42 +1,5 @@
import("//brave/build/config.gni")

group("chromedriver_dist_resources") {
deps = [
":strip_and_dump_chromedriver_symbols"
]
}

action("strip_and_dump_chromedriver_symbols") {
script = "//build/linux/dump_app_syms.py"
dump_syms_label = "//third_party/breakpad:dump_syms($host_toolchain)"
dump_syms_binary =
get_label_info(dump_syms_label, "root_out_dir") + "/" + "dump_syms"

chromedriver_binary = "$brave_dist_dir/chromedriver"
if (current_cpu == "x86") {
# Use "ia32" instead of "x86" for GYP compat.
chromedriver_symbol_file = "$root_out_dir/chromedriver.breakpad.ia32"
} else {
chromedriver_symbol_file = "$root_out_dir/chromedriver.breakpad.$current_cpu"
}

inputs = [ chromedriver_binary, dump_syms_binary ]
outputs = [ chromedriver_symbol_file ]

args = [
"./" + rebase_path(dump_syms_binary, root_build_dir),
"1", # strip_binary = true
rebase_path(chromedriver_binary, root_build_dir),
rebase_path(chromedriver_symbol_file, root_build_dir),
]

deps = [
dump_syms_label,
"//brave:brave_chromedriver_dist_resources",
]
}


action("generate_breakpad_symbols") {
symbols_dir = "$brave_dist_dir/$brave_project_name.breakpad.syms"
outputs = [
Expand Down
2 changes: 0 additions & 2 deletions app/mac/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import("//build/util/branding.gni")
import("//build/util/version.gni")
import("//chrome/common/features.gni")

group("chromedriver_dist_resources") {}

chrome_framework_name = chrome_product_full_name + " Framework"
chrome_helper_name = chrome_product_full_name + " Helper"

Expand Down
2 changes: 0 additions & 2 deletions app/win/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ copy("dist_resources") {
"//third_party/angle:copy_compiler_dll",
]
}

group("chromedriver_dist_resources") {}
13 changes: 0 additions & 13 deletions patches/chrome-test-chromedriver-BUILD.gn.patch

This file was deleted.

13 changes: 0 additions & 13 deletions patches/net-traffic_annotation-BUILD.gn.patch

This file was deleted.

16 changes: 0 additions & 16 deletions script/lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,6 @@ def get_target_arch():
else 'x64')


def get_chromedriver_version():
pattern = "^[ ]*chromedriver_version = \"([0-9][.][0-9]+)\""
build_gn_path = os.path.join(BRAVE_CORE_ROOT, 'BUILD.gn')
with open(build_gn_path, 'r') as build_gn_file:
for line in build_gn_file:
match = re.search(pattern, line)
if match:
version = match.group(1)
try:
version
except NameError:
raise(NameError("chromedriver_version Not Found"))

return 'v' + version


def get_env_var(name):
return (os.environ.get('BRAVE_' + name) or
os.environ.get('npm_config_BRAVE_' + name, ''))
Expand Down
2 changes: 1 addition & 1 deletion script/publish_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import sys
from lib.github import GitHub
from lib.config import (PLATFORM, DIST_URL, get_target_arch,
get_chromedriver_version, get_env_var,
get_env_var,
s3_config, get_zip_name, product_name,
project_name, SOURCE_ROOT, dist_dir,
output_dir, get_brave_version,
Expand Down
28 changes: 0 additions & 28 deletions script/test/test_config.py

This file was deleted.

6 changes: 1 addition & 5 deletions script/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import tempfile

from lib.config import (PLATFORM, DIST_URL, get_target_arch,
get_chromedriver_version, get_env_var, s3_config,
get_env_var, s3_config,
get_zip_name, product_name, project_name,
SOURCE_ROOT, dist_dir, output_dir, get_brave_version,
get_raw_version)
Expand Down Expand Up @@ -68,10 +68,6 @@ def main():
# elif PLATFORM == 'win32':
# upload_brave(repo, release, os.path.join(dist_dir(), PDB_NAME))

# Upload chromedriver and mksnapshot.
chromedriver = get_zip_name('chromedriver', get_chromedriver_version())
upload_brave(repo, release, os.path.join(dist_dir(), chromedriver), force=args.force)

pkgs = get_brave_packages(output_dir(), release_channel(), get_raw_version())

if PLATFORM == 'darwin':
Expand Down

0 comments on commit c7985f8

Please sign in to comment.