-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include other language's sourceSets in tests #35
Comments
Not quite. It should add all classes as module patches, not just the classes compiled from Java. It should use |
|
Oh well, I found out that this seems to give every class file: "$moduleName=" + test.getTestClassesDirs().asFileTree.asPath But the tests still do not run :( any ideas? |
You don't need the files, the root directories are just fine. Make sure you got the syntax right. I haven't checked what separator |
@oehme The syntax is correct. I printed the option: Using --patch-module com.athaydes.rawhttp.core=/Users/renato/programming/projects/rawhttp/rawhttp-core/build/classes/java/test:/Users/renato/programming/projects/rawhttp/rawhttp-core/build/classes/kotlin/test The What else can control what tests should run (the names are correct as they worked on Java 8)??? |
Looks like by adding a single Java test to the project, things go further... But Gradle is just totally broken, now I get some other random error:
It just hangs there forever after that. |
Having SLF4j on the module path will break Gradle's test executors. That's a known bug. I don't think adding a Java test fixed anything, it's just trying to run the Java class first. You'll still get the same error for the Groovy class later. I don't know why it won't load that class, I'm afraid you'll have to debug that issue with |
Can you get Gradle to run any tests in Groovy or Kotlin?? I created a hello-world project to try and it just doesn't work no matter what I do. |
I don't have time to look into this atm, please try using a debugger to understand why the JVM won't load the class. |
Issue based on gradle/gradle#5303 (comment)
When trying to run Kotlin or Groovy tests, this error occurs:
The stack-trace is not helpful as it just shows it can't find the class when running tests... but as @oehme pointed out in the original issue, looks like this line is to blame: it should add the source directories of all test tasks, not only Java's test task.
The text was updated successfully, but these errors were encountered: