Skip to content

Commit

Permalink
[7.1.0] Cherry-pick all presubmit.yml changes
Browse files Browse the repository at this point in the history
Hopefully this will fix our presubmits!

---------

Co-authored-by: Googler <[email protected]>
Co-authored-by: Googler <[email protected]>
Co-authored-by: John Cater <[email protected]>
Co-authored-by: David Ostrovsky <[email protected]>
Co-authored-by: Justin Horvitz <[email protected]>
  • Loading branch information
6 people committed Jan 3, 2024
1 parent 8e2972b commit 0120e98
Show file tree
Hide file tree
Showing 20 changed files with 119 additions and 109 deletions.
82 changes: 47 additions & 35 deletions .bazelci/postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,27 @@ tasks:
- "-//src/test/shell/bazel:bazel_coverage_cc_released_test_gcc"
- "-//src/test/shell/bazel:bazel_coverage_cc_head_test_gcc"
- "-//src/test/shell/bazel:bazel_coverage_sh_test"
# https://github.com/bazelbuild/bazel/issues/18776
# Centos7 uses python 2 by default, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
fedora39:
shell_commands:
- sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
android_ndk_repository/android_ndk_repository/' WORKSPACE.bzlmod
- rm -f WORKSPACE.bzlmod.bak
- rm -rf $HOME/bazeltest
- mkdir $HOME/bazeltest
build_flags:
- "--config=ci-linux"
build_targets:
- "//src:bazel"
- "//src:bazel_jdk_minimal"
- "//src/main/java/..."
include_json_profile:
- build
- test
Expand Down Expand Up @@ -85,13 +99,6 @@ tasks:
- "//tools/bash/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -152,13 +159,6 @@ tasks:
- "//tools/bash/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -206,13 +206,6 @@ tasks:
- "-//src/test/shell/bazel/apple:bazel_apple_test"
# https://github.com/bazelbuild/bazel/issues/17408
- "-//src/test/shell/bazel/apple:bazel_objc_test"
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
# https://github.com/bazelbuild/bazel/issues/17410
- "-//src/test/java/com/google/devtools/build/lib/platform:SystemMemoryPressureEventTest"
# https://github.com/bazelbuild/bazel/issues/17411
Expand All @@ -223,6 +216,17 @@ tasks:
- "-//src/test/shell/bazel:bazel_determinism_test"
# https://github.com/bazelbuild/bazel/issues/17457
- "-//src/test/shell/bazel:jdeps_test"
# Macs can't find python, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
# Disable recently regressed tests: https://github.com/bazelbuild/bazel/issues/20437
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CppSysrootTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcImportConfiguredTargetTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:BazelJ2ObjcLibraryTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcToolchainTest"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -262,10 +266,6 @@ tasks:
- "-//src/test/shell/bazel:bazel_cc_code_coverage_test"
# MacOS does not have cgroups so it can't support hardened sandbox
- "-//src/test/shell/integration:bazel_hardened_sandboxed_worker_test"
# https://github.com/bazelbuild/bazel/issues/16521 & https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android/..."
- "-//src/tools/android/java/com/google/devtools/build/android/..."
- "-//src/test/java/com/google/devtools/build/android/dexer:AllTests"
# https://github.com/bazelbuild/bazel/issues/16525
- "-//src/test/java/com/google/devtools/build/lib/buildtool:KeepGoingTest"
- "-//src/test/java/com/google/devtools/build/lib/buildtool:DanglingSymlinkTest"
Expand All @@ -277,6 +277,25 @@ tasks:
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
# https://github.com/bazelbuild/bazel/issues/17007
- "-//src/test/java/com/google/devtools/build/lib/platform:SystemMemoryPressureEventTest"
# https://github.com/bazelbuild/bazel/issues/16521 & https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android/..."
- "-//src/tools/android/java/com/google/devtools/build/android/..."
- "-//src/test/java/com/google/devtools/build/android/dexer:AllTests"
# Macs can't find python, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
# Disable recently regressed tests: https://github.com/bazelbuild/bazel/issues/20437
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CppSysrootTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcImportConfiguredTargetTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:BazelJ2ObjcLibraryTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcToolchainTest"
# https://github.com/bazelbuild/bazel/issues/17411
- "-//src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace:PatchApiBlackBoxTest"
# https://github.com/bazelbuild/bazel/issues/17447
- "-//src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace:GitRepositoryBlackBoxTest"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -404,13 +423,6 @@ tasks:
- "-//src/test/py/bazel:bazel_yanked_versions_test"
- "-//src/test/py/bazel:bzlmod_query_test"
- "-//src/test/shell/bazel:verify_workspace"
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down
83 changes: 48 additions & 35 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,27 @@ tasks:
- "-//src/test/shell/bazel:bazel_coverage_cc_released_test_gcc"
- "-//src/test/shell/bazel:bazel_coverage_cc_head_test_gcc"
- "-//src/test/shell/bazel:bazel_coverage_sh_test"
# https://github.com/bazelbuild/bazel/issues/18776
# Centos7 uses python 2 by default, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
fedora39:
shell_commands:
- sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
android_ndk_repository/android_ndk_repository/' WORKSPACE.bzlmod
- rm -f WORKSPACE.bzlmod.bak
- rm -rf $HOME/bazeltest
- mkdir $HOME/bazeltest
build_flags:
- "--config=ci-linux"
build_targets:
- "//src:bazel"
- "//src:bazel_jdk_minimal"
- "//src/main/java/..."
include_json_profile:
- build
- test
Expand Down Expand Up @@ -87,13 +101,6 @@ tasks:
- "//tools/bash/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -155,13 +162,6 @@ tasks:
- "//tools/bash/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -210,13 +210,6 @@ tasks:
- "-//src/test/shell/bazel/apple:bazel_apple_test"
# https://github.com/bazelbuild/bazel/issues/17408
- "-//src/test/shell/bazel/apple:bazel_objc_test"
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
# https://github.com/bazelbuild/bazel/issues/17410
- "-//src/test/java/com/google/devtools/build/lib/platform:SystemMemoryPressureEventTest"
# https://github.com/bazelbuild/bazel/issues/17411
Expand All @@ -227,6 +220,17 @@ tasks:
- "-//src/test/shell/bazel:bazel_determinism_test"
# https://github.com/bazelbuild/bazel/issues/17457
- "-//src/test/shell/bazel:jdeps_test"
# Macs can't find python, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
# Disable recently regressed tests: https://github.com/bazelbuild/bazel/issues/20437
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CppSysrootTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcImportConfiguredTargetTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:BazelJ2ObjcLibraryTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcToolchainTest"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -267,10 +271,6 @@ tasks:
- "-//src/test/shell/bazel:bazel_cc_code_coverage_test"
# MacOS does not have cgroups so it can't support hardened sandbox
- "-//src/test/shell/integration:bazel_hardened_sandboxed_worker_test"
# https://github.com/bazelbuild/bazel/issues/16521 & https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android/..."
- "-//src/tools/android/java/com/google/devtools/build/android/..."
- "-//src/test/java/com/google/devtools/build/android/dexer:AllTests"
# https://github.com/bazelbuild/bazel/issues/16525
- "-//src/test/java/com/google/devtools/build/lib/buildtool:KeepGoingTest"
- "-//src/test/java/com/google/devtools/build/lib/buildtool:DanglingSymlinkTest"
Expand Down Expand Up @@ -335,6 +335,26 @@ tasks:
- "-//src/test/shell/bazel:bazel_repository_cache_test"
- "-//src/test/shell/integration:aquery_test"
- "-//src/test/shell/integration:py_args_escaping_test"
# https://github.com/bazelbuild/bazel/issues/16521 & https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android/..."
- "-//src/tools/android/java/com/google/devtools/build/android/..."
- "-//src/test/java/com/google/devtools/build/android/dexer:AllTests"
# Macs can't find python, so these fail: https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
# Disable recently regressed tests: https://github.com/bazelbuild/bazel/issues/20437
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CppSysrootTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcImportConfiguredTargetTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:ObjcRulesTests"
- "-//src/test/java/com/google/devtools/build/lib/rules/objc:BazelJ2ObjcLibraryTest"
- "-//src/test/java/com/google/devtools/build/lib/rules/cpp:CcToolchainTest"
- "-//src/test/shell/integration:minimal_jdk_test"
# https://github.com/bazelbuild/bazel/issues/17411
- "-//src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace:PatchApiBlackBoxTest"
# https://github.com/bazelbuild/bazel/issues/17447
- "-//src/test/java/com/google/devtools/build/lib/blackbox/tests/workspace:GitRepositoryBlackBoxTest"
include_json_profile:
- build
- test
Expand Down Expand Up @@ -468,13 +488,6 @@ tasks:
# Flaky on rbe_ubuntu2004
# https://github.com/bazelbuild/continuous-integration/issues/1631
- "-//src/test/shell/bazel:bazel_sandboxing_networking_test"
# https://github.com/bazelbuild/bazel/issues/18776
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:android_instrumentation_test_integration_test_with_platforms"
- "-//src/test/shell/bazel/android:aapt_integration_test"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_head_android_tools"
- "-//src/test/shell/bazel/android:aapt_integration_test_with_platforms"
include_json_profile:
- build
- test
Expand Down
3 changes: 3 additions & 0 deletions src/test/py/bazel/py_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def createSimpleFiles(self):
])

def testSmoke(self):
if test_base.TestBase.IsDarwin():
# Re-enable after fixing https://github.com/bazelbuild/bazel/issues/20660
return
self.createSimpleFiles()
_, stdout, _ = self.RunBazel(['run', '//a:a'])
self.assertIn('Hello, World', stdout)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ source "${CURRENT_DIR}/android_helper.sh" \
|| { echo "android_helper.sh not found!" >&2; exit 1; }
fail_if_no_android_sdk

resolve_android_toolchains "$1"
resolve_android_toolchains

function create_test_app() {

Expand Down
2 changes: 1 addition & 1 deletion src/test/shell/bazel/android/aapt_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ source "$(rlocation io_bazel/src/test/shell/integration_test_setup.sh)" \
# (bazelbuild/continuous-integration#578).
add_to_bazelrc "build --incompatible_use_python_toolchains=false"

resolve_android_toolchains "$1"
resolve_android_toolchains

function test_build_with_aapt2() {
create_new_workspace
Expand Down
2 changes: 1 addition & 1 deletion src/test/shell/bazel/android/aar_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fail_if_no_android_sdk
source "${CURRENT_DIR}/../../integration_test_setup.sh" \
|| { echo "integration_test_setup.sh not found!" >&2; exit 1; }

resolve_android_toolchains "$1"
resolve_android_toolchains

# Regression test for https://github.com/bazelbuild/bazel/issues/1928.
function test_empty_tree_artifact_action_inputs_mount_empty_directories() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/shell/bazel/android/aidl_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fail_if_no_android_sdk
source "$(rlocation io_bazel/src/test/shell/integration_test_setup.sh)" \
|| { echo "integration_test_setup.sh not found!" >&2; exit 1; }

resolve_android_toolchains "$1"
resolve_android_toolchains

function test_simple_idl_srcs() {
create_new_workspace
Expand Down
Loading

0 comments on commit 0120e98

Please sign in to comment.