Skip to content

Commit

Permalink
fix(bazel): fix recursive integration test file diffs (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
miraleung authored Jun 1, 2021
1 parent fe4006e commit d4783a6
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 33 deletions.
2 changes: 1 addition & 1 deletion rules_bazel/java/integration_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _diff_integration_goldens_impl(ctx):
rm -rf $(find ./ -type f -name 'PlaceholderFile.java')
rm -r $(find ./ -type d -empty)
cd ..
diff codegen_tmp test/integration/goldens/{api_name}/ > {diff_output}
diff -r codegen_tmp test/integration/goldens/{api_name} > {diff_output}
# Bash `diff` command will return exit code 1 when there are differences between the two
# folders. So we explicitly `exit 0` after the diff command to avoid build failure.
exit 0
Expand Down
11 changes: 7 additions & 4 deletions test/integration/goldens/asset/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package(default_visibility = ["//visibility:public"])

filegroup(
name = "goldens_files",
srcs = glob([
"*.java",
"gapic_metadata.json",
]),
srcs = glob(
["**/*"],
exclude = [
"BUILD.bazel",
".*.sw*",
],
),
)
11 changes: 7 additions & 4 deletions test/integration/goldens/credentials/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package(default_visibility = ["//visibility:public"])

filegroup(
name = "goldens_files",
srcs = glob([
"*.java",
"gapic_metadata.json",
]),
srcs = glob(
["**/*"],
exclude = [
"BUILD.bazel",
".*.sw*",
],
),
)
11 changes: 7 additions & 4 deletions test/integration/goldens/iam/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package(default_visibility = ["//visibility:public"])

filegroup(
name = "goldens_files",
srcs = glob([
"*.java",
"gapic_metadata.json",
]),
srcs = glob(
["**/*"],
exclude = [
"BUILD.bazel",
".*.sw*",
],
),
)
11 changes: 7 additions & 4 deletions test/integration/goldens/kms/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package(default_visibility = ["//visibility:public"])

filegroup(
name = "goldens_files",
srcs = glob([
"*.java",
"gapic_metadata.json",
]),
srcs = glob(
["**/*"],
exclude = [
"BUILD.bazel",
".*.sw*",
],
),
)
11 changes: 7 additions & 4 deletions test/integration/goldens/library/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package(default_visibility = ["//visibility:public"])

filegroup(
name = "goldens_files",
srcs = glob([
"*.java",
"gapic_metadata.json",
]),
srcs = glob(
["**/*"],
exclude = [
"BUILD.bazel",
".*.sw*",
],
),
)
11 changes: 7 additions & 4 deletions test/integration/goldens/logging/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package(default_visibility = ["//visibility:public"])

filegroup(
name = "goldens_files",
srcs = glob([
"*.java",
"gapic_metadata.json",
]),
srcs = glob(
["**/*"],
exclude = [
"BUILD.bazel",
".*.sw*",
],
),
)
11 changes: 7 additions & 4 deletions test/integration/goldens/pubsub/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package(default_visibility = ["//visibility:public"])

filegroup(
name = "goldens_files",
srcs = glob([
"*.java",
"gapic_metadata.json",
]),
srcs = glob(
["**/*"],
exclude = [
"BUILD.bazel",
".*.sw*",
],
),
)
11 changes: 7 additions & 4 deletions test/integration/goldens/redis/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package(default_visibility = ["//visibility:public"])

filegroup(
name = "goldens_files",
srcs = glob([
"*.java",
"gapic_metadata.json",
]),
srcs = glob(
["**/*"],
exclude = [
"BUILD.bazel",
".*.sw*",
],
),
)

0 comments on commit d4783a6

Please sign in to comment.