Java tests do not run if the project's path contains "@"
Created by: bocon13
When the project's path contains a directory that contains an "@", Buck fails to run Java tests.
Error:
Unable to locate junit on the classpath. Please add as a test dependency.
The root cause is that FileClassPathRunner
splits the classfile path prematurely -- on the "@" in the project path rather than on the "@" used as a sentinel -- so the classfile cannot be found and is ignored.
For example:
file:/tmp/buck@2/@/tmp/buck@2/buck-out/gen/test/classpath-file
becomes 2/@/tmp/buck@2/buck-out/gen/test/classpath-file
One example where this issue comes up in practice is that Jenkins will create workspace directories with "@" for concurrent builds on the same machine (e.g. workspace@2
).