Skip to content
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

Tests do not run under gradle 3.1. #3

Open
felixvf opened this issue Nov 12, 2016 · 7 comments
Open

Tests do not run under gradle 3.1. #3

felixvf opened this issue Nov 12, 2016 · 7 comments
Assignees
Labels

Comments

@felixvf
Copy link
Collaborator

felixvf commented Nov 12, 2016

While the build itself works, the tests do not. See this branch https://github.com/felixvf/gradle-mirah-plugin/tree/fix_gradle_3_incompatibility and this build log https://travis-ci.org/felixvf/gradle-mirah-plugin/builds/175296216 . As you (@ysb33r) are also the maintainer of gradleTest, you may know best where and how to fix this.

@ysb33r ysb33r added the bug label Nov 12, 2016
@ysb33r ysb33r self-assigned this Nov 12, 2016
@ysb33r
Copy link
Collaborator

ysb33r commented Nov 12, 2016

Have a look at the latest master and see if you can reproduce the problem. It now contains gradleTest 1.0-beta4 and has been tested up to Gradle 3.1.

@ysb33r
Copy link
Collaborator

ysb33r commented Nov 12, 2016

BTW if you see The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead just ignore that - it will be addressed in the next GradleTest release.

@felixvf
Copy link
Collaborator Author

felixvf commented Nov 12, 2016

The problem still persists.

The problem is not using gradle 3.1 as one of the versions for the plugin to be tested under while using gradle 2.14 to execute the build of gradle-mirah-plugin.
The problem is using gradle 2.8 or higher as one of the version for the plugin to be tested under while using gradle 3.1 to execute the build of gradle-mirah-plugin.

@ysb33r
Copy link
Collaborator

ysb33r commented Nov 12, 2016

Right, so I am missing something here. I've just tested on a Mac with 3.1 as the build version and it seems to work.

icidi:mirah-plugin schalkc$ sdk use gradle 3.1
gradle==== BROADCAST =================================================================
* 10/11/16: Grails 3.2.3 released on SDKMAN! #grailsfw
* 10/11/16: Grails 3.1.14 released on SDKMAN! #grailsfw
* 08/11/16: Kotlin 1.0.5 released on SDKMAN! #kotlin
================================================================================

Using gradle version 3.1 in this shell.
icidi:mirah-plugin schalkc$ gradle build
Starting a Gradle Daemon (subsequent builds will be faster)
Download https://plugins.gradle.org/m2/com/gradle/publish/plugin-publish-plugin/0.9.4/plugin-publish-plugin-0.9.4.pom
Download https://plugins.gradle.org/m2/gradle/plugin/nl/javadude/gradle/plugins/license-gradle-plugin/0.13.1/license-gradle-plugin-0.13.1.pom
Download https://plugins.gradle.org/m2/com/gradle/publish/plugin-publish-plugin/0.9.4/plugin-publish-plugin-0.9.4.jar
Download https://plugins.gradle.org/m2/gradle/plugin/nl/javadude/gradle/plugins/license-gradle-plugin/0.13.1/license-gradle-plugin-0.13.1.jar
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:compileJava UP-TO-DATE
:compileGroovy
:processResources
:classes
:jar
:javadoc UP-TO-DATE
:javadocJar
:sourcesJar
:assemble
:prepareTestRepo
:compileTestJava UP-TO-DATE
:compileTestGroovy
:processTestResources
:testClasses
:test
:compileGradleTestJava UP-TO-DATE
:gradleTestGenerator
:compileGradleTestGroovy
:processGradleTestResources UP-TO-DATE
:gradleTestClasses
:gradleTestClasspathManifest
:gradleTest
:licenseGradleTest UP-TO-DATE
:licenseMain UP-TO-DATE
:licenseTest UP-TO-DATE
:license UP-TO-DATE
:check
:build

BUILD SUCCESSFUL

Total time: 2 mins 48.822 secs

The question thus is what is different on your system.

@felixvf
Copy link
Collaborator Author

felixvf commented Nov 14, 2016

Oh, the problem is even more wicked:

# gradle clean assemble check
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:clean
:compileJava UP-TO-DATE
:compileGroovy
:processResources
:classes
:jar
:javadoc UP-TO-DATE
:javadocJar
:sourcesJar
:assemble
:prepareTestRepo
:compileTestJava UP-TO-DATE
:compileTestGroovy
:processTestResources
:testClasses
:test
:compileGradleTestJava UP-TO-DATE
:gradleTestGenerator
:compileGradleTestGroovy
:processGradleTestResources UP-TO-DATE
:gradleTestClasses
:gradleTestClasspathManifest
:gradleTest
:licenseGradleTest UP-TO-DATE
:licenseMain UP-TO-DATE
:licenseTest UP-TO-DATE
:license UP-TO-DATE
:check

BUILD SUCCESSFUL

So everything is ok? However:

# gradle clean check
Starting a Gradle Daemon (subsequent builds will be faster)
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:clean
:compileJava UP-TO-DATE
:compileGroovy
:processResources
:classes
:prepareTestRepo
:compileTestJava UP-TO-DATE
:compileTestGroovy
:processTestResources
:testClasses
:test
:compileGradleTestJava UP-TO-DATE
:gradleTestGenerator
:compileGradleTestGroovy
:processGradleTestResources UP-TO-DATE
:gradleTestClasses
:gradleTestClasspathManifest
:gradleTest

gradleTest.tests.BasicMirahProjectCompatibilitySpec > BasicMirahProject : 2.8 FAILED
    org.gradle.testkit.runner.UnexpectedBuildFailure at BasicMirahProjectCompatibilitySpec.groovy:93

gradleTest.tests.BasicMirahProjectCompatibilitySpec > BasicMirahProject : 2.9 FAILED
    org.gradle.testkit.runner.UnexpectedBuildFailure at BasicMirahProjectCompatibilitySpec.groovy:93

gradleTest.tests.BasicMirahProjectCompatibilitySpec > BasicMirahProject : 2.10 FAILED
    org.gradle.testkit.runner.UnexpectedBuildFailure at BasicMirahProjectCompatibilitySpec.groovy:93

gradleTest.tests.BasicMirahProjectCompatibilitySpec > BasicMirahProject : 2.12 FAILED
    org.gradle.testkit.runner.UnexpectedBuildFailure at BasicMirahProjectCompatibilitySpec.groovy:93

gradleTest.tests.BasicMirahProjectCompatibilitySpec > BasicMirahProject : 2.14 FAILED
    org.gradle.testkit.runner.UnexpectedBuildFailure at BasicMirahProjectCompatibilitySpec.groovy:93

gradleTest.tests.BasicMirahProjectCompatibilitySpec > BasicMirahProject : 3.1 FAILED
    org.gradle.testkit.runner.UnexpectedBuildFailure at BasicMirahProjectCompatibilitySpec.groovy:93

10 tests completed, 6 failed
:gradleTest FAILED

FAILURE: Build failed with an exception.

So the problem may be related to some dependency not being built. But that problem applies only to certain gradle versions?

@ysb33r
Copy link
Collaborator

ysb33r commented Nov 14, 2016

Nice!. Thx for finding that one. I'll investigate.

@ysb33r
Copy link
Collaborator

ysb33r commented Nov 14, 2016

OK. sligtly subtle. I have updated the build to ensure jar has been run before gradleTest is run.

P.S. At this point I have to think whether this is something worth fixing in gradleTest as there are applications fo GradleTest which do not apply to writing plugins so having the dependency implicitly applied by the plugin might not necessarily be the best solution.

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

No branches or pull requests

2 participants