aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorc-parsons <cparsons@google.com>2019-10-08 15:46:35 -0400
committerGitHub <noreply@github.com>2019-10-08 15:46:35 -0400
commitcff8af42e9dd84bb7e4a9a89732c7c34fde7a75d (patch)
tree9f342e1ee70f0eb3652e5314f1e787a656f00245 /tests
parent47c6eb15c6b16421b4a16be29bc1e42b80dcd559 (diff)
downloadbazel-skylib-cff8af42e9dd84bb7e4a9a89732c7c34fde7a75d.tar.gz
Remove genfiles_dir retrieval method (#203)upstream/1.0.1
genfiles_dir has been the same as bin_dir for several Bazel releases, and is being fully removed in upcoming Bazel release.
Diffstat (limited to 'tests')
-rw-r--r--tests/unittest_tests.bzl23
1 files changed, 5 insertions, 18 deletions
diff --git a/tests/unittest_tests.bzl b/tests/unittest_tests.bzl
index e3ca45b..ed1c599 100644
--- a/tests/unittest_tests.bzl
+++ b/tests/unittest_tests.bzl
@@ -180,44 +180,31 @@ inspect_actions_test = analysistest.make(
########################################
####### inspect_output_dirs_test #######
########################################
-_OutputDirInfo = provider(fields = ["bin_path", "genfiles_path"])
+_OutputDirInfo = provider(fields = ["bin_path"])
def _inspect_output_dirs_test(ctx):
"""Test verifying output directories used by a test."""
env = analysistest.begin(ctx)
- # Assert that the output dirs observed by the aspect added by analysistest
- # are the same as those observed by the rule directly, even when that's
- # under a config transition and therefore not the same as the output
- # dirs used by the test rule.
+ # Assert that the output bin dir observed by the aspect added by analysistest
+ # is the same as those observed by the rule directly, even when that's
+ # under a config transition and therefore not the same as the bin dir
+ # used by the test rule.
bin_path = analysistest.target_bin_dir_path(env)
- genfiles_path = analysistest.target_genfiles_dir_path(env)
target_under_test = analysistest.target_under_test(env)
asserts.false(env, not bin_path, "bin dir path not found.")
- asserts.false(env, not genfiles_path, "genfiles path not found.")
asserts.false(
env,
bin_path == ctx.bin_dir.path,
"bin dir path expected to differ between test and target_under_test.",
)
- asserts.false(
- env,
- genfiles_path == ctx.genfiles_dir.path,
- "genfiles dir path expected to differ between test and target_under_test.",
- )
asserts.equals(env, bin_path, target_under_test[_OutputDirInfo].bin_path)
- asserts.equals(
- env,
- genfiles_path,
- target_under_test[_OutputDirInfo].genfiles_path,
- )
return analysistest.end(env)
def _inspect_output_dirs_fake_rule(ctx):
return [
_OutputDirInfo(
bin_path = ctx.bin_dir.path,
- genfiles_path = ctx.genfiles_dir.path,
),
]