Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
More tests for deps check
Browse files Browse the repository at this point in the history
  • Loading branch information
borkaehw committed Dec 10, 2019
1 parent 67ff718 commit abb2228
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
23 changes: 22 additions & 1 deletion tests/dependencies/indirect/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@ load("@rules_scala_annex//rules:providers.bzl", "reconfigure_deps_configuration"
reconfigure_deps_configuration(
name = "scala",
provider = "//scala:2_12",
used = "off",
used = select({
":deps_used_off": "off",
"//conditions:default": "error"
}),
direct = select({
":deps_direct_off": "off",
"//conditions:default": "error"
}),
)

config_setting(
name = "deps_used_off",
define_values = {
"scala_deps_used": "off",
},
)

config_setting(
name = "deps_direct_off",
define_values = {
"scala_deps_direct": "off",
},
)

scala_library(
Expand Down
5 changes: 5 additions & 0 deletions tests/dependencies/indirect/test
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@

! bazel build --define=scala_deps_used=off :c || false
bazel build --define=scala_deps_used=off :c |& grep "buildozer 'add deps //dependencies/indirect:a' //dependencies/indirect:c"

! bazel build --define=scala_deps_direct=off :c || false
bazel build --define=scala_deps_direct=off :c |& grep "buildozer 'remove deps //dependencies/indirect:a' //dependencies/indirect:b"

bazel build --define=scala_deps_used=off --define=scala_deps_direct=off :c

0 comments on commit abb2228

Please sign in to comment.