Skip to content

Conversation

simuons
Copy link
Collaborator

@simuons simuons commented Feb 1, 2021

Description

Add missing exit 1 to make test actually fail.

Had to remove jvm_opts = ["-Xbootclasspath/p:$(location @bazel_tools//third_party/java/jdk/langtools:javac_jar)"],
because test fails for wrong reason -Xbootclasspath/p is no longer a supported option.

Motivation

Tried to write a test using action_should_fail_with_message and couldn't make it fail with a wrong error message.

Add missing `exit 1` to make test actaully fail

Had to remove `jvm_opts = ["-Xbootclasspath/p:$(location
@bazel_tools//third_party/java/jdk/langtools:javac_jar)"],`
because test fails for wrong reason `-Xbootclasspath/p is no longer a
supported option.`
Prefix flag with a name otherwise it looks it up as class name and fails
with

Caused by: java.lang.ClassNotFoundException:
test_expect_failure.compilers_jvm_flags.args.txt
@simuons
Copy link
Collaborator Author

simuons commented Feb 2, 2021

Also fixes #855 and duplicates #860

@ittaiz ittaiz merged commit 9c01bd8 into bazel-contrib:master Feb 2, 2021
@simuons simuons deleted the fix-action_should_fail_with_message-helper branch February 2, 2021 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants