I worked around it. I was trying to compile JUnit tests, then load the generated classes, and run any classes annotated with @RunWith(Suite.class)
, but when I tried to pass the classes to JUnitCore, the loaded classes seemed to get lost.
Anyway, because this is for a custom Ant task anyway, I used the Ant JUnitTask class, and used the canonical names of the classes to run and added the compiled test directory to the JUnitTask classpath.