Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

If a test class depends on another test class, put both in the same BUILD rule #5

Open
cgrushko opened this issue Sep 22, 2017 · 4 comments

Comments

@cgrushko
Copy link
Contributor

... otherwise Bazel will complain that a java_test depends on another java_test, which is illegal.

@petroseskinder
Copy link
Member

I am also not seeing this as an issue.

@cgrushko
Copy link
Contributor Author

What do you mean?

@petroseskinder
Copy link
Member

I am currently not seeing anyjava_test BUILD rules that depend on other java_test BUILD rules. That means that this is currently not an issue. Instead, it is a "best practice."

@cgrushko
Copy link
Contributor Author

This is from a test run on JavaRx, where two files ending with .*Test.java (and both importing org.junit.Test) have an edge between them, which causes BFG to

  1. Put each one separately in a java_test
  2. Make one depend on the other, leading to a build breakage (Bazel doesn't allow java_test to depend on another java_test)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants