Skip to content

Commit

Permalink
Remove the test_WORKSPACE_files hack for workspace_resolved_test.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorcloudy committed May 19, 2023
1 parent ade9e72 commit d234dcd
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 111 deletions.
20 changes: 0 additions & 20 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -254,26 +254,6 @@ dist_http_archive(
patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN,
)

# For testing, have an distdir_tar with all the archives implicit in every
# WORKSPACE, to that they don't have to be refetched for every test
# calling `bazel sync`.
distdir_tar(
name = "test_WORKSPACE_files",
archives = [
"android_tools_pkg-0.28.0.tar",
],
dirname = "test_WORKSPACE/distdir",
dist_deps = {dep: attrs for dep, attrs in DIST_DEPS.items() if "test_WORKSPACE_files" in attrs["used_in"]},
sha256 = {
"android_tools_pkg-0.28.0.tar": "db3b02421ae974e0b33573f3e4f658d5f89cc9a0b42baae0ba2ac08e25c0720a",
},
urls = {
"android_tools_pkg-0.28.0.tar": [
"https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.28.0.tar",
],
},
)

dist_http_archive(
name = "io_bazel_skydoc",
)
Expand Down
30 changes: 2 additions & 28 deletions distdir_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"package_version": "0.0.6",
},
Expand All @@ -59,7 +58,6 @@ DIST_DEPS = {
"urls": ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz"],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"package_version": "0.0.6",
"strip_prefix": "rules_cc-0.0.6",
Expand All @@ -74,7 +72,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"license_kinds": [
"@rules_license//licenses/spdx:Apache-2.0",
Expand All @@ -91,7 +88,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"license_kinds": [
"@rules_license//licenses/spdx:Apache-2.0",
Expand All @@ -114,7 +110,6 @@ DIST_DEPS = {
"patches": ["//third_party/protobuf:21.7.patch"],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"license_kinds": [
"@rules_license//licenses/generic:notice",
Expand All @@ -137,7 +132,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"package_version": "1.48.1",
},
Expand All @@ -155,7 +149,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"com_envoyproxy_protoc_gen_validate": {
Expand All @@ -172,7 +165,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"bazel_gazelle": {
Expand All @@ -184,7 +176,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"package_version": "0.24.0",
},
Expand All @@ -198,7 +189,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"license_kinds": [
"@rules_license//licenses/spdx:Apache-2.0",
Expand All @@ -215,7 +205,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"license_kinds": [
"@rules_license//licenses/generic:notice",
Expand All @@ -231,7 +220,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"re2": {
Expand All @@ -243,7 +231,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
},
"com_google_absl": {
Expand All @@ -255,7 +242,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"strip_prefix": "abseil-cpp-20220623.1",
"license_kinds": [
Expand Down Expand Up @@ -296,7 +282,6 @@ DIST_DEPS = {
"https://maven.google.com/com/android/tools/r8/8.0.40/r8-8.0.40.jar",
],
"used_in": [
"test_WORKSPACE_files",
],
"package_version": "8.0.40",
},
Expand All @@ -309,7 +294,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"package_version": "1.3.0",
},
Expand All @@ -334,7 +318,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"package_version": "0.0.3",
},
Expand All @@ -347,7 +330,6 @@ DIST_DEPS = {
],
"used_in": [
"additional_distfiles",
"test_WORKSPACE_files",
],
"package_version": "0.8.0",
},
Expand All @@ -372,7 +354,7 @@ DIST_DEPS = {
"strip_prefix": "rules_python-0.19.0",
"urls": ["https://github.com/bazelbuild/rules_python/releases/download/0.19.0/rules_python-0.19.0.tar.gz"],
"archive": "rules_python-0.19.0.tar.gz",
"used_in": ["additional_distfiles", "test_WORKSPACE_files"],
"used_in": ["additional_distfiles"],
},
"rules_testing": {
"sha256": "4e21f9aa7996944ce91431f27bca374bff56e680acfe497276074d56bc5d9af2",
Expand All @@ -382,7 +364,7 @@ DIST_DEPS = {
"https://github.com/bazelbuild/rules_testing/releases/download/v0.0.4/rules_testing-v0.0.4.tar.gz",
],
"archive": "rules_testing-v0.0.4.tar.gz",
"used_in": ["additional_distfiles", "test_WORKSPACE_files"],
"used_in": ["additional_distfiles"],
"package_version": "0.0.4",
},
"desugar_jdk_libs": {
Expand All @@ -405,7 +387,6 @@ DIST_DEPS = {
"https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.6.zip",
],
"used_in": [
"test_WORKSPACE_files",
],
"package_version": "2.6",
},
Expand All @@ -418,7 +399,6 @@ DIST_DEPS = {
"https://cdn.azul.com/zulu/bin/zulu17.38.21-ca-jdk17.0.5-linux_x64.tar.gz",
],
"used_in": [
"test_WORKSPACE_files",
],
},
"openjdk_linux_aarch64_vanilla": {
Expand All @@ -430,7 +410,6 @@ DIST_DEPS = {
"https://cdn.azul.com/zulu/bin/zulu17.38.21-ca-jdk17.0.5-linux_aarch64.tar.gz",
],
"used_in": [
"test_WORKSPACE_files",
],
},
"openjdk_linux_s390x_vanilla": {
Expand All @@ -442,7 +421,6 @@ DIST_DEPS = {
"https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.4.1_1.tar.gz",
],
"used_in": [
"test_WORKSPACE_files",
],
},
"openjdk_linux_ppc64le_vanilla": {
Expand All @@ -464,7 +442,6 @@ DIST_DEPS = {
"https://cdn.azul.com/zulu/bin/zulu17.38.21-ca-jdk17.0.5-macosx_x64.tar.gz",
],
"used_in": [
"test_WORKSPACE_files",
],
},
"openjdk_macos_aarch64_vanilla": {
Expand All @@ -476,7 +453,6 @@ DIST_DEPS = {
"https://cdn.azul.com/zulu/bin/zulu17.38.21-ca-jdk17.0.5-macosx_aarch64.tar.gz",
],
"used_in": [
"test_WORKSPACE_files",
],
},
"openjdk_win_vanilla": {
Expand All @@ -488,7 +464,6 @@ DIST_DEPS = {
"https://cdn.azul.com/zulu/bin/zulu17.38.21-ca-jdk17.0.5-win_x64.zip",
],
"used_in": [
"test_WORKSPACE_files",
],
},
"openjdk_win_arm64_vanilla": {
Expand All @@ -500,7 +475,6 @@ DIST_DEPS = {
"https://cdn.azul.com/zulu/bin/zulu17.38.21-ca-jdk17.0.5-win_aarch64.zip",
],
"used_in": [
"test_WORKSPACE_files",
],
},
}
Expand Down
8 changes: 0 additions & 8 deletions src/test/shell/bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -930,20 +930,12 @@ sh_test(
tags = ["no_windows"],
)

filegroup(
name = "test_WORKSPACE",
srcs = [
"@test_WORKSPACE_files//:archives",
],
)

sh_test(
name = "workspace_resolved_test",
size = "large",
srcs = ["workspace_resolved_test.sh"],
data = [
":test-deps",
":test_WORKSPACE",
"@bazel_tools//tools/bash/runfiles",
],
shard_count = 22,
Expand Down
Loading

0 comments on commit d234dcd

Please sign in to comment.