Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 41 for runWithFailure (0.34 sec)

  1. platforms/jvm/plugins-java/src/integTest/groovy/org/gradle/integtests/JavaProjectIntegrationTest.groovy

            buildFile.writelns("apply plugin: 'java'")
            testFile("src/main/java/org/gradle/broken.java") << "broken"
    
            ExecutionFailure failure = executer.withTasks("build").runWithFailure()
    
            failure.assertHasDescription("Execution failed for task ':compileJava'.")
            failure.assertHasCause("Compilation failed; see the compiler error output for details.")
        }
    
        @Test
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Feb 22 20:01:36 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  2. subprojects/core/src/integTest/groovy/org/gradle/execution/commandline/CommandLineIntegrationTest.groovy

        def setup() {
            NativeServicesTestFixture.initialize()
        }
    
        def "has non zero exit code on build failure"() {
            ExecutionFailure failure = executer.withTasks('unknown').runWithFailure()
            failure.assertHasDescription("Task 'unknown' not found in root project 'commandLine'.")
        }
    
        def createProject() {
            buildFile """
                import org.gradle.internal.jvm.Jvm
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Apr 03 15:21:22 UTC 2024
    - 12K bytes
    - Viewed (0)
  3. platforms/jvm/language-java/src/integTest/groovy/org/gradle/jvm/toolchain/JavaToolchainDownloadSpiAuthenticationIntegrationTest.groovy

                    .withTasks("compileJava")
                    .requireOwnGradleUserHomeDir("needs to be able to provision fresh toolchains")
                    .withToolchainDownloadEnabled()
                    .runWithFailure()
    
            then:
            failure.assertHasDescription("Could not determine the dependencies of task ':compileJava'.")
                   .assertHasCause("Could not resolve all dependencies for configuration ':compileClasspath'.")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 06:41:25 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. platforms/core-runtime/wrapper-main/src/integTest/groovy/org/gradle/integtests/WrapperChecksumVerificationTest.groovy

            prepareWrapper(new URI(gradleBin))
    
            and:
            file(WRAPPER_PROPERTIES_PATH) << 'distributionSha256Sum=bad'
    
            when:
            def failure = wrapperExecuter.withStackTraceChecksDisabled().runWithFailure()
            def f = new File(file("user-home/wrapper/dists/gradle-bin").listFiles()[0], "gradle-bin.zip")
    
            then:
            failure.error.contains("""
    Verification of Gradle distribution failed!
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 23 05:54:32 UTC 2024
    - 6K bytes
    - Viewed (0)
  5. platforms/core-runtime/launcher/src/integTest/groovy/org/gradle/launcher/daemon/DispatchingFailureIntegrationSpec.groovy

            50.times {
                executer.usingProjectDirectory(projectdir)
                        .withTasks("tasks")
                        .runWithFailure()
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  6. platforms/core-runtime/wrapper-main/src/integTest/groovy/org/gradle/integtests/WrapperUpgradeIntegrationTest.groovy

            given:
            prepareWrapper()
    
            expect:
            def failure = wrapperExecuter.withTasks("wrapper", "--gradle-version", badVersion).runWithFailure()
    
            and:
            failure.assertHasDescription("Invalid version specified for argument '--gradle-version'")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 23 05:54:32 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. platforms/jvm/testing-jvm/src/integTest/groovy/org/gradle/testing/testng/TestNGProducesOldReportsIntegrationTest.groovy

    ${mavenCentralRepository()}
    dependencies { testImplementation 'org.testng:testng:6.3.1' }
    
    test {
        reports.html.required = false
        useTestNG()
    }
    """
            when:
            executer.withTasks('test').runWithFailure().assertTestsFailed()
    
            then:
            !new TestNGExecutionResult(file(".")).hasTestNGXmlResults()
            new JUnitXmlTestExecutionResult(file(".")).hasJUnitXmlResults()
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 20:52:40 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  8. platforms/core-runtime/wrapper-main/src/integTest/groovy/org/gradle/integtests/WrapperProjectIntegrationTest.groovy

            }
        }
    """
        }
    
        void "has non-zero exit code on build failure"() {
            given:
            prepareWrapper()
    
            when:
            def failure = wrapperExecuter.withTasks('unknown').runWithFailure()
    
            then:
            failure.assertThatDescription(CoreMatchers.startsWith("Task 'unknown' not found in root project"))
        }
    
        @Issue("https://github.com/gradle/gradle/issues/16055")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 23 05:54:32 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  9. platforms/extensibility/plugin-development/src/crossVersionTest/groovy/org/gradle/plugin/devel/PrecompiledGroovyPluginCrossVersionSpec.groovy

            given:
            precompiledGroovyPluginBuiltWith(version(getCurrent()))
    
            when:
            def result = pluginTaskExecutedWith(version(getPrevious())).runWithFailure()
    
            then:
            result.assertHasDescription("An exception occurred applying plugin request [id: '$PLUGIN_ID', version: '1.0']")
            result.assertHasCause("Failed to apply plugin [id '$PLUGIN_ID']")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Nov 16 22:36:52 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  10. platforms/core-configuration/kotlin-dsl/src/integTest/kotlin/org/gradle/kotlin/dsl/compile/AbstractCompileAvoidanceIntegrationTest.kt

            return BuildOperationsAssertions(buildOperations, output, true)
        }
    
        protected
        fun configureProjectAndExpectCompileFailure(expectedFailure: String) {
            val error = executer.runWithFailure().error
            MatcherAssert.assertThat(error, CoreMatchers.containsString(expectedFailure))
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sun Sep 24 17:45:43 UTC 2023
    - 4.6K bytes
    - Viewed (0)
Back to top