From 9bc3b20053a8b99bf2c4a31323a7f96fabb9f1ec Mon Sep 17 00:00:00 2001 From: philwo Date: Tue, 2 Oct 2018 07:26:54 -0700 Subject: [PATCH] Fix the "nojava" platform and enable full presubmit checks for the various JDK platforms now that we have enough GCE resources. This makes sure that our presubmit tests are mostly identical with the postsubmit tests again, reducing the risk of rollbacks. PiperOrigin-RevId: 215384620 --- .bazelci/postsubmit.yml | 34 +++++++++++- .bazelci/presubmit.yml | 119 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+), 1 deletion(-) diff --git a/.bazelci/postsubmit.yml b/.bazelci/postsubmit.yml index 2446c1ec276f6c..2895e415359293 100644 --- a/.bazelci/postsubmit.yml +++ b/.bazelci/postsubmit.yml @@ -52,9 +52,12 @@ platforms: # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/5888 - "-//src/test/java/com/google/devtools/build/android/ziputils:ziputils-tests" ubuntu1804_nojava: + build_flags: + - "--javabase=@openjdk_linux_archive//:runtime" build_targets: - - "//examples/cpp:all" + - "//src:bazel" test_flags: + - "--javabase=@openjdk_linux_archive//:runtime" - "--test_timeout=1200" test_targets: - "--" @@ -65,8 +68,37 @@ platforms: - "-//src/test/java/com/google/devtools/build/android/..." - "-//src/test/shell/bazel/android/..." # Currently broken tests on this platform. + # These tests do not work without an installed system JDK: + # (see https://github.com/bazelbuild/bazel/issues/6214#issuecomment-424813868) + # TODO(philwo): Use tags instead of an explicit blacklist. + - "-//src/test/py/bazel:launcher_test" + - "-//src/test/py/bazel:runfiles_test" - "-//src/test/shell/bazel:bazel_bootstrap_distfile_test" + - "-//src/test/shell/bazel:bazel_coverage_test" + - "-//src/test/shell/bazel:bazel_determinism_test" + - "-//src/test/shell/bazel:bazel_example_test" - "-//src/test/shell/bazel:bazel_java_test" + - "-//src/test/shell/bazel:bazel_random_characters_test" + - "-//src/test/shell/bazel:bazel_repository_cache_test" + - "-//src/test/shell/bazel:bazel_rules_test" + - "-//src/test/shell/bazel:bazel_sandboxing_test" + - "-//src/test/shell/bazel:bazel_test_test" + - "-//src/test/shell/bazel:empty_package_test" + - "-//src/test/shell/bazel:external_integration_test" + - "-//src/test/shell/bazel:java_launcher_test" + - "-//src/test/shell/bazel:local_repository_test" + - "-//src/test/shell/bazel:maven_test" + - "-//src/test/shell/bazel:runfiles_test" + - "-//src/test/shell/integration:bazel_java_test" + - "-//src/test/shell/integration:bazel_sandboxed_worker_test" + - "-//src/test/shell/integration:bazel_worker_test" + - "-//src/test/shell/integration:discard_analysis_cache_test" + - "-//src/test/shell/integration:discard_graph_edges_test" + - "-//src/test/shell/integration:java_integration_test" + - "-//src/test/shell/integration:nonincremental_builds_test" + - "-//src/test/shell/integration:output_filter_test" + - "-//src/test/shell/integration:stub_finds_runfiles_test" + - "-//src/test/shell/integration:test_test" ubuntu1804_java9: shell_commands: - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^# diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index dc483cb8a2daa5..05374cf5a8c8ad 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -1,11 +1,47 @@ --- platforms: ubuntu1404: + shell_commands: + - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^# + android_ndk_repository/android_ndk_repository/' WORKSPACE + - rm -f WORKSPACE.bak build_targets: - "//src:bazel" + test_flags: + - "--test_timeout=1200" + test_targets: + - "--" + - "//scripts/..." + - "//src/test/..." + - "//third_party/ijar/..." + - "//tools/android/..." + # Disable Slow Tests + - "-//src/test/shell/bazel:bazel_determinism_test" + # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663 + - "-//src/test/shell/bazel/android:android_ndk_integration_test" + # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/5888 + - "-//src/test/java/com/google/devtools/build/android/ziputils:ziputils-tests" ubuntu1604: + shell_commands: + - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^# + android_ndk_repository/android_ndk_repository/' WORKSPACE + - rm -f WORKSPACE.bak build_targets: - "//src:bazel" + test_flags: + - "--test_timeout=1200" + test_targets: + - "--" + - "//scripts/..." + - "//src/test/..." + - "//third_party/ijar/..." + - "//tools/android/..." + # Disable Slow Tests + - "-//src/test/shell/bazel:bazel_determinism_test" + # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663 + - "-//src/test/shell/bazel/android:android_ndk_integration_test" + # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/5888 + - "-//src/test/java/com/google/devtools/build/android/ziputils:ziputils-tests" ubuntu1804: shell_commands: - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^# @@ -28,14 +64,97 @@ platforms: # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/5888 - "-//src/test/java/com/google/devtools/build/android/ziputils:ziputils-tests" ubuntu1804_nojava: + build_flags: + - "--javabase=@openjdk_linux_archive//:runtime" build_targets: - "//src:bazel" + test_flags: + - "--javabase=@openjdk_linux_archive//:runtime" + - "--test_timeout=1200" + test_targets: + - "--" + - "//scripts/..." + - "//src/test/..." + - "//third_party/ijar/..." + # Disable Slow Tests + - "-//src/test/shell/bazel:bazel_determinism_test" + # We can't run Android tests without an installed Android SDK / NDK. + - "-//src/test/java/com/google/devtools/build/android/..." + - "-//src/test/shell/bazel/android/..." + # Currently broken tests on this platform. + # These tests do not work without an installed system JDK: + # (see https://github.com/bazelbuild/bazel/issues/6214#issuecomment-424813868) + # TODO(philwo): Use tags instead of an explicit blacklist. + - "-//src/test/py/bazel:launcher_test" + - "-//src/test/py/bazel:runfiles_test" + - "-//src/test/shell/bazel:bazel_bootstrap_distfile_test" + - "-//src/test/shell/bazel:bazel_coverage_test" + - "-//src/test/shell/bazel:bazel_determinism_test" + - "-//src/test/shell/bazel:bazel_example_test" + - "-//src/test/shell/bazel:bazel_java_test" + - "-//src/test/shell/bazel:bazel_random_characters_test" + - "-//src/test/shell/bazel:bazel_repository_cache_test" + - "-//src/test/shell/bazel:bazel_rules_test" + - "-//src/test/shell/bazel:bazel_sandboxing_test" + - "-//src/test/shell/bazel:bazel_test_test" + - "-//src/test/shell/bazel:empty_package_test" + - "-//src/test/shell/bazel:external_integration_test" + - "-//src/test/shell/bazel:java_launcher_test" + - "-//src/test/shell/bazel:local_repository_test" + - "-//src/test/shell/bazel:maven_test" + - "-//src/test/shell/bazel:runfiles_test" + - "-//src/test/shell/integration:bazel_java_test" + - "-//src/test/shell/integration:bazel_sandboxed_worker_test" + - "-//src/test/shell/integration:bazel_worker_test" + - "-//src/test/shell/integration:discard_analysis_cache_test" + - "-//src/test/shell/integration:discard_graph_edges_test" + - "-//src/test/shell/integration:java_integration_test" + - "-//src/test/shell/integration:nonincremental_builds_test" + - "-//src/test/shell/integration:output_filter_test" + - "-//src/test/shell/integration:stub_finds_runfiles_test" + - "-//src/test/shell/integration:test_test" ubuntu1804_java9: + shell_commands: + - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^# + android_ndk_repository/android_ndk_repository/' WORKSPACE + - rm -f WORKSPACE.bak build_targets: - "//src:bazel" + test_flags: + - "--test_timeout=1200" + test_targets: + - "--" + - "//scripts/..." + - "//src/test/..." + - "//third_party/ijar/..." + - "//tools/android/..." + # Disable Slow Tests + - "-//src/test/shell/bazel:bazel_determinism_test" + # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663 + - "-//src/test/shell/bazel/android:android_ndk_integration_test" + # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/5888 + - "-//src/test/java/com/google/devtools/build/android/ziputils:ziputils-tests" ubuntu1804_java10: + shell_commands: + - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^# + android_ndk_repository/android_ndk_repository/' WORKSPACE + - rm -f WORKSPACE.bak build_targets: - "//src:bazel" + test_flags: + - "--test_timeout=1200" + test_targets: + - "--" + - "//scripts/..." + - "//src/test/..." + - "//third_party/ijar/..." + - "//tools/android/..." + # Disable Slow Tests + - "-//src/test/shell/bazel:bazel_determinism_test" + # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663 + - "-//src/test/shell/bazel/android:android_ndk_integration_test" + # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/5888 + - "-//src/test/java/com/google/devtools/build/android/ziputils:ziputils-tests" macos: shell_commands: - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#