Skip to content

Commit

Permalink
Sort genquery outputs to be compatible with --incompatible_genquery_u…
Browse files Browse the repository at this point in the history
…se_graphless_output (#531)

Fixes: #529
  • Loading branch information
jin authored Mar 5, 2021
1 parent ec2c561 commit 6a3bd6a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
20 changes: 18 additions & 2 deletions tests/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,21 @@ genquery(
],
)

genrule(
name = "testonly-deps-sorted",
srcs = [":testonly-deps"],
outs = ["testonly-deps-sorted.txt"],
cmd = "cat $< | sort > $@",
testonly = 1,
)

diff_test(
name = "testonly_artifacts_test",
file1 = select({
"@bazel_tools//src/conditions:windows": "testonly-deps.golden",
"//conditions:default": "testonly-deps.golden.unix",
}),
file2 = ":testonly-deps",
file2 = ":testonly-deps-sorted",
)

# https://github.com/coursier/coursier/issues/1792
Expand All @@ -50,13 +58,21 @@ genquery(
scope = ["@version_interval_testing//:io_grpc_grpc_netty_shaded"],
)

genrule(
name = "version-interval-deps-sorted",
srcs = [":version_interval_deps"],
outs = ["version-interval-deps-sorted.txt"],
cmd = "cat $< | sort > $@",
testonly = 1,
)

diff_test(
name = "version_interval_deps_test",
file1 = select({
"@bazel_tools//src/conditions:windows": "version-interval-deps.golden.dos",
"//conditions:default": "version-interval-deps.golden.unix",
}),
file2 = ":version_interval_deps",
file2 = ":version-interval-deps-sorted.txt",
)

java_import(
Expand Down
14 changes: 7 additions & 7 deletions tests/integration/version-interval-deps.golden.dos
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@version_interval_testing//:io_grpc_grpc_netty_shaded
@version_interval_testing//:v1/https/repo1.maven.org/maven2/io/grpc/grpc-netty-shaded/1.29.0/grpc-netty-shaded-1.29.0.jar
@version_interval_testing//:com_google_android_annotations
@version_interval_testing//:com_google_code_gson_gson
@version_interval_testing//:com_google_errorprone_error_prone_annotations
@version_interval_testing//:io_grpc_grpc_api
@version_interval_testing//:io_grpc_grpc_core
@version_interval_testing//:v1/https/repo1.maven.org/maven2/io/grpc/grpc-core/1.29.0/grpc-core-1.29.0.jar
@version_interval_testing//:io_grpc_grpc_netty_shaded
@version_interval_testing//:io_perfmark_perfmark_api
@version_interval_testing//:io_grpc_grpc_api
@version_interval_testing//:com_google_errorprone_error_prone_annotations
@version_interval_testing//:com_google_code_gson_gson
@version_interval_testing//:com_google_android_annotations
@version_interval_testing//:v1/https/repo1.maven.org/maven2/io/grpc/grpc-core/1.29.0/grpc-core-1.29.0.jar
@version_interval_testing//:v1/https/repo1.maven.org/maven2/io/grpc/grpc-netty-shaded/1.29.0/grpc-netty-shaded-1.29.0.jar
14 changes: 7 additions & 7 deletions tests/integration/version-interval-deps.golden.unix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@version_interval_testing//:io_grpc_grpc_netty_shaded
@version_interval_testing//:v1/https/repo1.maven.org/maven2/io/grpc/grpc-netty-shaded/1.29.0/grpc-netty-shaded-1.29.0.jar
@version_interval_testing//:com_google_android_annotations
@version_interval_testing//:com_google_code_gson_gson
@version_interval_testing//:com_google_errorprone_error_prone_annotations
@version_interval_testing//:io_grpc_grpc_api
@version_interval_testing//:io_grpc_grpc_core
@version_interval_testing//:v1/https/repo1.maven.org/maven2/io/grpc/grpc-core/1.29.0/grpc-core-1.29.0.jar
@version_interval_testing//:io_grpc_grpc_netty_shaded
@version_interval_testing//:io_perfmark_perfmark_api
@version_interval_testing//:io_grpc_grpc_api
@version_interval_testing//:com_google_errorprone_error_prone_annotations
@version_interval_testing//:com_google_code_gson_gson
@version_interval_testing//:com_google_android_annotations
@version_interval_testing//:v1/https/repo1.maven.org/maven2/io/grpc/grpc-core/1.29.0/grpc-core-1.29.0.jar
@version_interval_testing//:v1/https/repo1.maven.org/maven2/io/grpc/grpc-netty-shaded/1.29.0/grpc-netty-shaded-1.29.0.jar

0 comments on commit 6a3bd6a

Please sign in to comment.