Skip to content

Commit

Permalink
Merge upstream update (#2738)
Browse files Browse the repository at this point in the history
Co-authored-by: Chrome Release Bot (LUCI) <chrome-official-brancher@chops-service-accounts.iam.gserviceaccount.com>
Co-authored-by: Dana Dahlstrom <[email protected]>
Co-authored-by: Leandro Lovisolo <[email protected]>
Co-authored-by: Jason <[email protected]>
Co-authored-by: Colin Liang <[email protected]>
Co-authored-by: Colin Liang <[email protected]>
Co-authored-by: Kevin Lubick <[email protected]>
Co-authored-by: John Stiles <[email protected]>
Co-authored-by: Brian Salomon <[email protected]>
Co-authored-by: Arjun Menon <[email protected]>
Co-authored-by: Hao <[email protected]>
Co-authored-by: Bo-Rong Chen <[email protected]>
Co-authored-by: Aaron Gable <[email protected]>
Co-authored-by: Max Zhang <[email protected]>
Co-authored-by: Yavor Goulishev <[email protected]>
Co-authored-by: Yijia Zhang <[email protected]>
Co-authored-by: chrome-release-bot <[email protected]>
Co-authored-by: Andrew Savage <[email protected]>
Co-authored-by: Garo Bournoutian <[email protected]>
Co-authored-by: Ahmed Elzeiny <[email protected]>
Co-authored-by: Ahmed Elzeiny <[email protected]>
Co-authored-by: Jelle Foks <[email protected]>
Co-authored-by: Brian Osman <[email protected]>
Co-authored-by: Dominik Röttsches <[email protected]>
Co-authored-by: Madhura Jayaraman <[email protected]>
Co-authored-by: Niranjan Yardi <[email protected]>
Co-authored-by: Kaido Kert <[email protected]>
Co-authored-by: Oscar Vestlie <[email protected]>
Co-authored-by: Igor Sarkisov <[email protected]>
Co-authored-by: Tyler Holcombe <[email protected]>
Co-authored-by: victorpasoshnikov <[email protected]>
Co-authored-by: iuriionishchenko <[email protected]>
Co-authored-by: Drew Thomas <[email protected]>
Co-authored-by: Holden Warriner <[email protected]>
Co-authored-by: thorsten sideb0ard <[email protected]>
Co-authored-by: Sherry Zhou <[email protected]>
Co-authored-by: Nick Wellnhofer <[email protected]>
Co-authored-by: aee <[email protected]>
Co-authored-by: johnxwork <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 10,500 changed files with 1,157,669 additions and 1,680 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 4 additions & 1 deletion .github/actions/on_device_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,21 @@ runs:
GITHUB_PR_HEAD_USER_ID: ${{ github.event.pull_request.head.user.id }}
GITHUB_COMMIT_AUTHOR_USERNAME: ${{ github.event.commits[0].author.username }}
GITHUB_COMMIT_AUTHOR_EMAIL: ${{ github.event.commits[0].author.email }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
set -uxe
python3 -u tools/on_device_tests_gateway_client.py \
--token ${GITHUB_TOKEN} \
--change_id "${GITHUB_PR_HEAD_SHA:-$GITHUB_SHA}" \
--change_id ${GITHUB_PR_NUMBER:-postsubmit} \
trigger \
--test_type ${{ env.TEST_TYPE }} \
--platform ${{ matrix.target_platform }} \
--config ${{ matrix.config }} \
--tag cobalt_github_${GITHUB_EVENT_NAME} \
--builder_name github_${{ matrix.platform }}_tests \
--build_number ${GITHUB_RUN_NUMBER} \
--builder_url ${GITHUB_RUN_URL} \
${LOADER_PLATFORM:+"--loader_config" "$LOADER_CONFIG"} \
${LOADER_PLATFORM:+"--loader_platform" "$LOADER_PLATFORM"} \
${DIMENSION:+"--dimension" "$DIMENSION"} \
Expand Down
1 change: 0 additions & 1 deletion .github/config/evergreen-x64.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"docker_service": "build-linux-evergreen",
"on_host_test": true,
"bootloader": "linux-x64x11",
"on_host_test_shards": ["0", "1", "2", "3", "blackbox", "wpt", "evergreen"],
"platforms": [
Expand Down
1 change: 0 additions & 1 deletion .github/config/win32.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"platforms": [
"win32"
],
"on_host_test": true,
"on_host_test_shards": ["0", "1", "2", "3"],
"includes": [
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- feature/*
schedule:
# GMT timezone.
- cron: '0 4 * * *'
- cron: '0 9 * * *'
workflow_dispatch:
inputs:
nightly:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/evergreen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- feature/*
schedule:
# GMT timezone.
- cron: '0 5 * * *'
- cron: '0 9 * * *'
workflow_dispatch:
inputs:
nightly:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- feature/*
schedule:
# GMT timezone.
- cron: '0 4 * * *'
- cron: '0 9 * * *'
workflow_dispatch:
inputs:
nightly:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: nightly_trigger
on:
schedule:
# GMT timezone.
- cron: '30 4 * * *'
- cron: '0 9 * * *'
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_trigger_24.lts.1+.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: nightly_trigger_24.lts.1+
on:
schedule:
# GMT timezone.
- cron: '30 5 * * *'
- cron: '0 10 * * *'
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/raspi-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- feature/*
schedule:
# GMT timezone.
- cron: '0 4 * * *'
- cron: '0 9 * * *'
workflow_dispatch:
inputs:
nightly:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/win32.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: win32

on:
# pull_request:
# types: [opened, reopened, synchronize, labeled]
# branches:
# - main
# - feature/*
pull_request:
types: [opened, reopened, synchronize, labeled]
branches:
- main
- feature/*
push:
branches:
- main
- feature/*
schedule:
# GTM timezone.
- cron: '0 4 * * *'
- cron: '0 9 * * *'
workflow_dispatch:
inputs:
nightly:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/xb1.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: xb1

on:
# pull_request:
# types: [opened, reopened, synchronize, labeled]
# branches:
# - main
# - feature/*
pull_request:
types: [opened, reopened, synchronize, labeled]
branches:
- main
- feature/*
push:
branches:
- main
- feature/*
schedule:
# GTM timezone.
- cron: '0 4 * * *'
- cron: '0 9 * * *'
workflow_dispatch:
inputs:
nightly:
Expand Down
73 changes: 49 additions & 24 deletions base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ assert(!is_nacl || is_nacl_saigo,

# This is here instead of in //build because //build is DEPS'd in by a few
# subprojects that still support MSVC.
assert(!is_win || is_clang,
assert(!is_win || is_clang || use_cobalt_customizations,
"only clang-cl is supported on Windows, see https://crbug.com/988071")

if (is_apple) {
Expand Down Expand Up @@ -192,6 +192,14 @@ if (enable_pkeys && is_debug) {
}
}

if (is_starboard) {
config("starboard_config") {
if (!is_gold) {
defines = [ "ENABLE_TEST_DATA" ]
}
}
}

buildflag_header("ios_cronet_buildflags") {
header = "ios_cronet_buildflags.h"
header_dir = "base/message_loop"
Expand Down Expand Up @@ -980,6 +988,7 @@ component("base") {
"profiler/module_cache_starboard.cc",
"profiler/stack_sampler_starboard.cc",
"rand_util_starboard.cc",
"strings/string_util_starboard.cc",
"strings/string_util_starboard.h",
"strings/sys_string_conversions_starboard.cc",
"synchronization/condition_variable_starboard.cc",
Expand Down Expand Up @@ -1092,6 +1101,8 @@ component("base") {

if (is_starboard) {
deps -= [ "//base/allocator/partition_allocator:raw_ptr" ]
# TODO: b/330221826 Change to |public_configs| with matching dependencies.
all_dependent_configs += [ ":starboard_config" ]
}

if (is_starboard && current_toolchain != host_toolchain) {
Expand All @@ -1103,10 +1114,6 @@ component("base") {
# to provide the appropriate `#define` here.
defines += [ "IS_RAW_PTR_IMPL" ]

if (!is_gold) {
defines += [ "ENABLE_TEST_DATA" ]
}

if (is_apple) {
deps += [ "//base/time/buildflags:buildflags" ]
}
Expand Down Expand Up @@ -1675,14 +1682,14 @@ component("base") {
]
}

if (is_win) {
if (is_win && !is_starboard) {
sources += [
"base_paths_win.cc",
"base_paths_win.h",
]
}

if (is_mac) {
if (is_mac && !is_starboard) {
sources += [
"base_paths_mac.h",
"base_paths_mac.mm",
Expand Down Expand Up @@ -1802,7 +1809,7 @@ component("base") {
}

# Windows.
if (is_win) {
if (is_win && !is_starboard) {
sources += [
"debug/debugger_win.cc",
"debug/gdi_debug_util_win.cc",
Expand Down Expand Up @@ -2031,7 +2038,7 @@ component("base") {
}

# Desktop Mac.
if (is_mac) {
if (is_mac && !is_starboard) {
sources += [
"allocator/partition_allocator/shim/allocator_interception_mac.h",
"allocator/partition_allocator/shim/allocator_interception_mac.mm",
Expand Down Expand Up @@ -2117,7 +2124,7 @@ component("base") {
}

# Mac or iOS.
if (is_apple) {
if (is_apple && !is_starboard) {
sources += [
"file_version_info_mac.h",
"file_version_info_mac.mm",
Expand Down Expand Up @@ -2199,7 +2206,7 @@ component("base") {
}

# iOS
if (is_ios) {
if (is_ios && !is_starboard) {
sources += [
"base_paths_mac.h",
"base_paths_mac.mm",
Expand Down Expand Up @@ -2368,7 +2375,7 @@ component("base") {
}
}

if ((is_posix && !is_apple && !is_android && !is_chromeos) || is_fuchsia) {
if ((is_posix && !is_apple && !is_android && !is_chromeos) || is_fuchsia || is_starboard) {
sources += [ "power_monitor/power_monitor_device_source_stub.cc" ]
}

Expand Down Expand Up @@ -2911,7 +2918,7 @@ if (!is_ios && !use_cobalt_customizations) {
}
}

if (is_win) {
if (is_win && !is_starboard) {
# Target to manually rebuild pe_image_test.dll which is checked into
# base/test/data/pe_image.
shared_library("pe_image_test") {
Expand All @@ -2936,7 +2943,7 @@ if (is_win) {
}
}

if ((is_win && (current_cpu == "x64" || current_cpu == "arm64")) || is_mac ||
if ((is_win && (current_cpu == "x64" || current_cpu == "arm64") && !is_starboard) || is_mac ||
(is_android && (current_cpu == "arm" || current_cpu == "arm64")) ||
(is_chromeos && current_cpu == "x64")) {
# Must be a loadable module so that it can be loaded/unloaded at runtime
Expand Down Expand Up @@ -3046,7 +3053,7 @@ copy("base_unittests_bundle_data") {
}
}

if (is_apple) {
if (is_apple && !is_starboard) {
source_set("base_unittests_arc") {
testonly = true
sources = [
Expand Down Expand Up @@ -3573,6 +3580,24 @@ test("base_unittests") {
"files/memory_mapped_file_unittest.cc",
]

if (is_win && use_hacky_cobalt_changes) {
sources -= [
"power_monitor/battery_state_sampler_unittest.cc",
"profiler/stack_sampling_profiler_unittest.cc",
"ranges/algorithm_unittest.cc",
"safe_numerics_unittest.cc",
"strings/string_util_unittest.cc",
"task/sequence_manager/atomic_flag_set_unittest.cc",
"test/test_future_unittest.cc",
"tools_sanity_unittest.cc",
"types/expected_unittest.cc",

# NiceMock needs to be fixed
"threading/scoped_blocking_call_unittest.cc",
]
cflags = [ "/wd4172" ]
}

if (is_clang) {
cflags_cc = [ "-Wno-trigraphs" ]
}
Expand Down Expand Up @@ -3636,7 +3661,7 @@ test("base_unittests") {
deps += [ "//build/rust:cxx_cppdeps" ]
}

if (is_apple) {
if (is_apple && !is_starboard) {
deps += [ ":base_unittests_arc" ]
}

Expand All @@ -3651,7 +3676,7 @@ test("base_unittests") {
"//tools/metrics/histograms/enums.xml",
]

if (is_win) {
if (is_win && !is_starboard) {
deps += [ "//base/win:base_win_buildflags" ]

sources += [
Expand Down Expand Up @@ -3732,7 +3757,7 @@ test("base_unittests") {
}
}

if (is_mac) {
if (is_mac && !is_starboard) {
sources += [
"allocator/partition_allocator/shim/allocator_interception_mac_unittest.mm",
"allocator/partition_allocator/shim/malloc_zone_functions_mac_unittest.cc",
Expand All @@ -3756,7 +3781,7 @@ test("base_unittests") {
]
}

if (is_apple && enable_mach_absolute_time_ticks) {
if (is_apple && enable_mach_absolute_time_ticks && !is_starboard) {
sources += [ "time/time_mac_unittest.mm" ]
}

Expand Down Expand Up @@ -3870,7 +3895,7 @@ test("base_unittests") {
sources += [ "debug/allocation_trace_unittest.cc" ]
}

if (is_ios) {
if (is_ios && !is_starboard) {
sources += [
"ios/device_util_unittest.mm",
"ios/scoped_critical_action_unittest.mm",
Expand Down Expand Up @@ -3994,7 +4019,7 @@ test("base_unittests") {
deps += [ ":partition_alloc_test_support" ]
}

if (is_mac) {
if (is_mac && !is_starboard) {
sources += [ "message_loop/message_pump_kqueue_unittest.cc" ]
frameworks = [
"CoreFoundation.framework",
Expand Down Expand Up @@ -4114,7 +4139,7 @@ test("base_unittests") {
]
}

if (is_win) {
if (is_win && !is_starboard) {
deps += [ "//base:scoped_handle_test_dll" ]
if (current_cpu == "x64" || current_cpu == "arm64") {
sources += [ "profiler/win32_stack_frame_unwinder_unittest.cc" ]
Expand All @@ -4126,7 +4151,7 @@ test("base_unittests") {
deps += [ ":rust_cfg_win_test" ]
}
}
if (is_apple) {
if (is_apple && !is_starboard) {
sources += [ "profiler/frame_pointer_unwinder_unittest.cc" ]
}
if (is_chromeos && current_cpu == "x64") {
Expand Down Expand Up @@ -4943,7 +4968,7 @@ fuzzer_test("base_json_string_escape_fuzzer") {
deps = [ "//base" ]
}

if (is_mac) {
if (is_mac && !is_starboard) {
protoc_convert("base_mach_port_rendezvous_convert_corpus") {
sources = [
"test/data/mach_port_rendezvous_fuzz/dead_name.textproto",
Expand Down
Loading

0 comments on commit 4f41939

Please sign in to comment.