diff options
author | Hector Oswaldo Caballero <hector.caballero@ericsson.com> | 2017-08-06 08:59:15 -0400 |
---|---|---|
committer | David Pursehouse <dpursehouse@collab.net> | 2019-02-13 15:43:01 +0900 |
commit | cc309ec0061b10c2bf0fb4114dd4ed9bfdc8078f (patch) | |
tree | 5d6c94ed96ed908f1daa537513084c4ab1d3517f | |
parent | 30fbb532a78e31b360d32db29a1a0fa6c6882209 (diff) |
Allow dash in name of junit_tests rule
So far, if the name of the rule contained a dash (hyphen), as in
high-availability plugin for example, the test execution failed with
error message:
bazel-out/local-fastbuild/bin/high-availability_testsTestSuite.java:6:
error: '{' expected
public class high-availability_testsTestSuite {}
^
This is due to the fact that dashes are not valid characters in the name
of a Java class.
Workaround this by replacing any dash with an underscore.
Change-Id: I80fd4c5bcff0d2af6f337636bd942f30d6a521c6
-rw-r--r-- | tools/bzl/junit.bzl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bzl/junit.bzl b/tools/bzl/junit.bzl index f816889ed8..4dfdb61a2c 100644 --- a/tools/bzl/junit.bzl +++ b/tools/bzl/junit.bzl @@ -65,7 +65,7 @@ _GenSuite = rule( ) def junit_tests(name, srcs, **kwargs): - s_name = name + "TestSuite" + s_name = name.replace("-", "_") + "TestSuite" _GenSuite( name = s_name, srcs = srcs, |