Commit 5c626330 authored by Ben Pastene's avatar Ben Pastene Committed by Commit Bot

Reland "Simplify Simple Chrome's gclient and GN conditionals."

This reverts commit 3d879e70.

Reason for reland:
- All hand-rolled DEPS-consuming apps have been updated.
- No changes in this CL between original & reland.

Original change's description:
> Revert "Simplify Simple Chrome's gclient and GN conditionals."
> 
> This reverts commit 072cfd65.
> 
> Reason for revert: Needed to fix merge conflicts for revert in https://crrev.com/c/2289991.
> 
> Original change's description:
> > Simplify Simple Chrome's gclient and GN conditionals.
> > 
> > Now uses the new gclient var 'cros_boards_with_qemu_images' for DEPS
> > hooks as well as for building the data_deps for CrOS tests in GN.
> > 
> > Bug: 937821
> > Change-Id: Ifdd05f09a4200328a06028be86aeb22c8486c65c
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2285361
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Reviewed-by: Dirk Pranke <dpranke@google.com>
> > Commit-Queue: Ben Pastene <bpastene@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#786312}
> 
> TBR=thakis@chromium.org,dpranke@google.com,bpastene@chromium.org
> 
> Change-Id: If0b181d298f6a9368af88eaf658f0226e2161c68
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 937821
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2289401
> Reviewed-by: Michael Moss <mmoss@chromium.org>
> Commit-Queue: Michael Moss <mmoss@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#786762}

TBR=thakis@chromium.org,mmoss@chromium.org,dpranke@google.com,bpastene@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 937821
Change-Id: Ia9759be4fcdf7dc510fefd9c020440478da5b8ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303031Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789644}
parent 75493b12
...@@ -159,12 +159,8 @@ vars = { ...@@ -159,12 +159,8 @@ vars = {
'cros_boards': Str(''), 'cros_boards': Str(''),
'cros_boards_with_qemu_images': Str(''), 'cros_boards_with_qemu_images': Str(''),
# Building for CrOS is only supported on linux currently. # Building for CrOS is only supported on linux currently.
'checkout_simplechrome': '(checkout_chromeos and host_os == "linux") and ("{cros_boards}" != "")', 'checkout_simplechrome': '"{cros_boards}" != ""',
# Surround the board var in quotes so gclient doesn't try parsing the string 'checkout_simplechrome_with_vms': '"{cros_boards_with_qemu_images}" != ""',
# as an expression.
# TODO(crbug.com/937821): Replace uses of this var with
# 'cros_boards_with_qemu_images' above.
'cros_download_vm': '(("{cros_boards}" == "amd64-generic") or ("{cros_boards}" == "betty")) or ("{cros_boards}" == "betty-pi-arc")',
# Should we build and test for public (ie: full) CrOS images, or private # Should we build and test for public (ie: full) CrOS images, or private
# (ie: release) images. # (ie: release) images.
'use_public_cros_config': 'not checkout_src_internal', 'use_public_cros_config': 'not checkout_src_internal',
...@@ -4874,7 +4870,7 @@ hooks = [ ...@@ -4874,7 +4870,7 @@ hooks = [
{ {
'name': 'cros_simplechrome_artifacts_with_vm', 'name': 'cros_simplechrome_artifacts_with_vm',
'pattern': '.', 'pattern': '.',
'condition': '(checkout_simplechrome and cros_download_vm) and use_public_cros_config', 'condition': 'checkout_simplechrome_with_vms and use_public_cros_config',
'action': [ 'action': [
'src/third_party/chromite/bin/cros', 'src/third_party/chromite/bin/cros',
'chrome-sdk', 'chrome-sdk',
...@@ -4883,7 +4879,7 @@ hooks = [ ...@@ -4883,7 +4879,7 @@ hooks = [
'--fallback-versions=10', '--fallback-versions=10',
'--nogn-gen', '--nogn-gen',
'--download-vm', '--download-vm',
'--boards={cros_boards}', '--boards={cros_boards_with_qemu_images}',
'--cache-dir=src/build/cros_cache/', '--cache-dir=src/build/cros_cache/',
'--log-level=error', '--log-level=error',
'--no-shell', '--no-shell',
...@@ -4892,7 +4888,7 @@ hooks = [ ...@@ -4892,7 +4888,7 @@ hooks = [
{ {
'name': 'cros_simplechrome_artifacts_with_no_vm', 'name': 'cros_simplechrome_artifacts_with_no_vm',
'pattern': '.', 'pattern': '.',
'condition': '(checkout_simplechrome and not cros_download_vm) and use_public_cros_config', 'condition': 'checkout_simplechrome and use_public_cros_config',
'action': [ 'action': [
'src/third_party/chromite/bin/cros', 'src/third_party/chromite/bin/cros',
'chrome-sdk', 'chrome-sdk',
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import("//build/config/chrome_build.gni") import("//build/config/chrome_build.gni")
import("//build/config/chromeos/args.gni") import("//build/config/chromeos/args.gni")
import("//build/config/gclient_args.gni")
assert(is_chromeos) assert(is_chromeos)
...@@ -15,15 +16,11 @@ if (is_chromeos_device && cros_sdk_version != "") { ...@@ -15,15 +16,11 @@ if (is_chromeos_device && cros_sdk_version != "") {
_cache_path_prefix = _cache_path_prefix =
"//build/cros_cache/chrome-sdk/symlinks/${cros_board}+${cros_sdk_version}" "//build/cros_cache/chrome-sdk/symlinks/${cros_board}+${cros_sdk_version}"
# It's difficult to determine if any given board supports QEMU images. So foreach(b, string_split(cros_boards_with_qemu_images, ":")) {
# check if there's one present in the expected location. if (cros_board == b) {
_qemu_image_path = "${_cache_path_prefix}+chromiumos_qemu_image.tar.xz" cros_is_vm = true
}
# TODO(crbug.com/937821): Check for the board in a gclient list var to }
# determine if we expect a VM image.
cros_is_vm = exec_script("//build/dir_exists.py",
[ rebase_path(_qemu_image_path) ],
"string") == "True"
_symlinks = [ _symlinks = [
# Tast harness & test data. # Tast harness & test data.
...@@ -39,7 +36,7 @@ if (is_chromeos_device && cros_sdk_version != "") { ...@@ -39,7 +36,7 @@ if (is_chromeos_device && cros_sdk_version != "") {
# VM-related tools. # VM-related tools.
_symlinks += [ _symlinks += [
rebase_path("${_cache_path_prefix}+sys-firmware/seabios"), rebase_path("${_cache_path_prefix}+sys-firmware/seabios"),
rebase_path(_qemu_image_path), rebase_path("${_cache_path_prefix}+chromiumos_qemu_image.tar.xz"),
rebase_path("${_cache_path_prefix}+app-emulation/qemu"), rebase_path("${_cache_path_prefix}+app-emulation/qemu"),
] ]
} }
......
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