Fix silently broken test_version.sh
tests
#1716
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes silently broken tests depending on
test_version/test_reporter
and adds an assertion to avoid future silent breakages. Part of #1482 and #1652.Moves
test_version/version_specific_tests_dir/scala_repositories.bzl
totest_version
.Updates
test_version.sh
to copy this file into test repos generated from bothversion_specific_tests_dir
andtest_reporter
.Updates
compilation_should_fail
to break if thebazel build
output doesn't contain the expectedErrorFile.scala
error.Motivation
The affected test cases expect their underlying builds to fail because of errors in
test_version/test_reporter/ErrorFile.scala
. Failing Scala 2.x build output should contain:Failing Scala 3.x build output should contain:
-- [E040] Syntax Error: ErrorFile.scala:6:2 ------------------------------------ 6 | } | ^ | ')' expected, but '}' found
Using
RULES_SCALA_TEST_ONLY
to select an affected test case revealed that the underlying build actually failed because Bazel couldn't find//:scrooge_repositories.bzl
: