diff --git a/.bazelci/postsubmit.yml b/.bazelci/postsubmit.yml index 0ff4c51bcb282a..cfa0d90314b24d 100644 --- a/.bazelci/postsubmit.yml +++ b/.bazelci/postsubmit.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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" @@ -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 @@ -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 diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 7d24c739659aca..4ecbd214998351 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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" @@ -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 @@ -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 diff --git a/src/test/py/bazel/py_test.py b/src/test/py/bazel/py_test.py index 6158b17b191a7e..83e45a16d103f6 100644 --- a/src/test/py/bazel/py_test.py +++ b/src/test/py/bazel/py_test.py @@ -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) diff --git a/src/test/shell/bazel/android/DexFileSplitter_synthetic_classes_test.sh b/src/test/shell/bazel/android/DexFileSplitter_synthetic_classes_test.sh index 44c4a00020f2ee..95a4e0d83c835f 100755 --- a/src/test/shell/bazel/android/DexFileSplitter_synthetic_classes_test.sh +++ b/src/test/shell/bazel/android/DexFileSplitter_synthetic_classes_test.sh @@ -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() { diff --git a/src/test/shell/bazel/android/aapt_integration_test.sh b/src/test/shell/bazel/android/aapt_integration_test.sh index 9fc17f76760701..9132f3b4f5b453 100755 --- a/src/test/shell/bazel/android/aapt_integration_test.sh +++ b/src/test/shell/bazel/android/aapt_integration_test.sh @@ -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 diff --git a/src/test/shell/bazel/android/aar_integration_test.sh b/src/test/shell/bazel/android/aar_integration_test.sh index 31025bb9fd022e..e52bd77a53a83b 100755 --- a/src/test/shell/bazel/android/aar_integration_test.sh +++ b/src/test/shell/bazel/android/aar_integration_test.sh @@ -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() { diff --git a/src/test/shell/bazel/android/aidl_integration_test.sh b/src/test/shell/bazel/android/aidl_integration_test.sh index 41ae3db3dbb46f..6a35a4827ee49b 100755 --- a/src/test/shell/bazel/android/aidl_integration_test.sh +++ b/src/test/shell/bazel/android/aidl_integration_test.sh @@ -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 diff --git a/src/test/shell/bazel/android/android_helper.sh b/src/test/shell/bazel/android/android_helper.sh index 2cb7864a4c2867..7d6341a908c602 100755 --- a/src/test/shell/bazel/android/android_helper.sh +++ b/src/test/shell/bazel/android/android_helper.sh @@ -111,16 +111,9 @@ function setup_head_android_tools_if_exists() { # Resolves Android toolchains with platforms. function resolve_android_toolchains() { - if [[ "$1" = '--with_platforms' ]]; then - echo "This test uses platform-based Android toolchain resolution." - add_to_bazelrc "build --incompatible_enable_android_toolchain_resolution" - add_to_bazelrc "build --incompatible_enable_cc_toolchain_resolution" - add_to_bazelrc "build --android_platforms=//test_android_platforms:simple" - else - echo "This test uses legacy Android toolchains." - add_to_bazelrc "build --noincompatible_enable_android_toolchain_resolution" - add_to_bazelrc "build --noincompatible_enable_cc_toolchain_resolution" - fi + add_to_bazelrc "build --incompatible_enable_android_toolchain_resolution" + add_to_bazelrc "build --incompatible_enable_cc_toolchain_resolution" + add_to_bazelrc "build --android_platforms=//test_android_platforms:simple" } setup_head_android_tools_if_exists diff --git a/src/test/shell/bazel/android/android_instrumentation_test_integration_test.sh b/src/test/shell/bazel/android/android_instrumentation_test_integration_test.sh index c10c21d9051719..8d05fe96162449 100755 --- a/src/test/shell/bazel/android/android_instrumentation_test_integration_test.sh +++ b/src/test/shell/bazel/android/android_instrumentation_test_integration_test.sh @@ -34,7 +34,7 @@ source "${CURRENT_DIR}/../../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 setup_android_instrumentation_test_env() { mkdir -p java/com/bin/res/values diff --git a/src/test/shell/bazel/android/android_integration_test.sh b/src/test/shell/bazel/android/android_integration_test.sh index cd83c7e988dc3d..01b047a86a0d7e 100755 --- a/src/test/shell/bazel/android/android_integration_test.sh +++ b/src/test/shell/bazel/android/android_integration_test.sh @@ -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 function test_sdk_library_deps() { create_new_workspace @@ -212,7 +212,6 @@ android_binary( ) EOF cat > MODULE.bazel << 'EOF' -# Required for android_integration_test_with_platforms bazel_dep(name = "platforms", version = "0.0.7") EOF diff --git a/src/test/shell/bazel/android/android_local_test_integration_test.sh b/src/test/shell/bazel/android/android_local_test_integration_test.sh index 0c5cf553450e01..fb91c52ec895d3 100755 --- a/src/test/shell/bazel/android/android_local_test_integration_test.sh +++ b/src/test/shell/bazel/android/android_local_test_integration_test.sh @@ -34,7 +34,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 function setup_android_local_test_env() { mkdir -p java/com/bin/res/values diff --git a/src/test/shell/bazel/android/android_ndk_integration_test.sh b/src/test/shell/bazel/android/android_ndk_integration_test.sh index 15f25906c7bad5..6eda46cbfac091 100755 --- a/src/test/shell/bazel/android/android_ndk_integration_test.sh +++ b/src/test/shell/bazel/android/android_ndk_integration_test.sh @@ -38,7 +38,7 @@ fail_if_no_android_ndk source "${CURRENT_DIR}/../../integration_test_setup.sh" \ || { echo "integration_test_setup.sh not found!" >&2; exit 1; } -resolve_android_toolchains $1 +resolve_android_toolchains function create_android_binary() { mkdir -p java/bazel diff --git a/src/test/shell/bazel/android/android_sdk_integration_test.sh b/src/test/shell/bazel/android/android_sdk_integration_test.sh index 3b8326808d761e..2e44190195970d 100755 --- a/src/test/shell/bazel/android/android_sdk_integration_test.sh +++ b/src/test/shell/bazel/android/android_sdk_integration_test.sh @@ -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 function test_android_sdk_repository_path_from_environment() { create_new_workspace diff --git a/src/test/shell/bazel/android/android_sh_test.bzl b/src/test/shell/bazel/android/android_sh_test.bzl index 426fc9c278bfd0..663890692d782a 100644 --- a/src/test/shell/bazel/android/android_sh_test.bzl +++ b/src/test/shell/bazel/android/android_sh_test.bzl @@ -30,7 +30,7 @@ CHECK_FOR_ANDROID_SDK = select( ) def android_sh_test(create_test_with_released_tools = True, **kwargs): - """Creates versions of the test with and without platforms and head android tools. + """Creates versions of the test with and without head android tools. Args: create_test_with_released_tools: Whether to create a version of the test with the released @@ -47,24 +47,14 @@ def android_sh_test(create_test_with_released_tools = True, **kwargs): # Test with released android_tools version. native.sh_test( name = name, - args = ["--without_platforms"], data = data, **kwargs ) - # Test with platform-based toolchain resolution. - native.sh_test( - name = name + "_with_platforms", - data = data, - args = ["--with_platforms"], - **kwargs - ) - # Test with android_tools version that's built at the same revision # as the test itself. native.sh_test( name = name + "_with_head_android_tools", - args = ["--without_platforms"], data = data + [ "//tools/android/runtime_deps:android_tools.tar", ], diff --git a/src/test/shell/bazel/android/desugarer_integration_test.sh b/src/test/shell/bazel/android/desugarer_integration_test.sh index fa25ace0938de3..87ded51a950e5a 100755 --- a/src/test/shell/bazel/android/desugarer_integration_test.sh +++ b/src/test/shell/bazel/android/desugarer_integration_test.sh @@ -38,7 +38,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 create_java_8_android_binary() { mkdir -p java/bazel diff --git a/src/test/shell/bazel/android/library_desugarer_integration_test.sh b/src/test/shell/bazel/android/library_desugarer_integration_test.sh index ce8bfcad33e74c..b8b5000066d35d 100755 --- a/src/test/shell/bazel/android/library_desugarer_integration_test.sh +++ b/src/test/shell/bazel/android/library_desugarer_integration_test.sh @@ -38,7 +38,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_library_desugar_lib_builds() { # TODO(b/299338002): Move this to the main desugarer test suite. diff --git a/src/test/shell/bazel/android/proguard_integration_test.sh b/src/test/shell/bazel/android/proguard_integration_test.sh index 8a322e3aa7bd47..869589de67919a 100755 --- a/src/test/shell/bazel/android/proguard_integration_test.sh +++ b/src/test/shell/bazel/android/proguard_integration_test.sh @@ -38,7 +38,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_proguard() { create_new_workspace diff --git a/src/test/shell/bazel/android/resource_processing_integration_test.sh b/src/test/shell/bazel/android/resource_processing_integration_test.sh index 18fef259b8e456..d4d2f08144b2f5 100755 --- a/src/test/shell/bazel/android/resource_processing_integration_test.sh +++ b/src/test/shell/bazel/android/resource_processing_integration_test.sh @@ -38,7 +38,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 setup_font_resources() { rm java/bazel/BUILD diff --git a/src/test/shell/bazel/jdeps_test.sh b/src/test/shell/bazel/jdeps_test.sh index 98513409df9929..2776ebee9c4c88 100755 --- a/src/test/shell/bazel/jdeps_test.sh +++ b/src/test/shell/bazel/jdeps_test.sh @@ -72,7 +72,7 @@ function test_jdeps() { # src/test/shell/bazel/jdeps_class_denylist.txt. find . -type f -iname \*class | \ grep -vFf "$denylist" | \ - xargs ../jdk/reduced/bin/jdeps --list-reduced-deps --ignore-missing-deps | \ + xargs -s 262144 ../jdk/reduced/bin/jdeps --list-reduced-deps --ignore-missing-deps | \ grep -v "unnamed module" > ../jdeps \ || fail "Failed to run jdeps on non denylisted class files." cd .. diff --git a/src/test/shell/integration/minimal_jdk_test.sh b/src/test/shell/integration/minimal_jdk_test.sh index 82f40fd9e63a94..dad2abe4aa6e64 100755 --- a/src/test/shell/integration/minimal_jdk_test.sh +++ b/src/test/shell/integration/minimal_jdk_test.sh @@ -42,13 +42,13 @@ export BAZEL_SUFFIX="_jdk_minimal" source "$(rlocation "io_bazel/src/test/shell/integration_test_setup.sh")" \ || { echo "integration_test_setup.sh not found!" >&2; exit 1; } -# Bazel's install base is < 370MB with minimal JDK and > 370MB with an all +# Bazel's install base is < 450MB with minimal JDK and > 450MB with an all # modules JDK. -function test_size_less_than_370MB() { +function test_size_less_than_450MB() { bazel info ib=$(bazel info install_base) size=$(du -s "$ib" | cut -d\ -f1) - maxsize=$((1024*370)) + maxsize=$((1024*450)) if [ $size -gt $maxsize ]; then echo "$ib was too big:" 1>&2 du -a "$ib" 1>&2