5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-02 10:40:31 +08:00

SQOOP-3414: Introduce a Gradle build parameter to set the ignoreTestFailures of the test tasks

This closes #59

(Szabolcs Vasas via Boglarka Egyed)
This commit is contained in:
Boglarka Egyed 2018-11-28 10:56:46 +01:00
parent f8fe691e21
commit 6a159ed282
2 changed files with 13 additions and 0 deletions

View File

@ -169,6 +169,16 @@ parameter for all the test tasks except +kerberizedTest+:
./gradlew -DforkEvery.default=30 test
----
The https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:ignoreFailures[ignoreFailures]
parameter of the Gradle test tasks is set to +false+ which means that if a Gradle test task fails the gradle
process returns with non-zero. In some CI tools (e.g. Jenkins) this will make the status of the job red and not yellow
which usually means some more serious issue than a test failure. To change this behavior you can use the
+-DignoreTestFailures+ property to set the +ignoreFailures+ parameter for all the test tasks:
----
./gradlew -DignoreTestFailures=true test
----
=== Third party tests
==== Installing the necessary databases

View File

@ -96,6 +96,7 @@ configurations.all {
def sqoopThirdPartyLib = System.getProperty("sqoop.thirdparty.lib.dir")
def forkEveryDefault = Integer.valueOf(System.getProperty("forkEvery.default", "0"))
def ignoreTestFailures = Boolean.getBoolean("ignoreTestFailures")
dependencies {
if (sqoopThirdPartyLib != null) runtime fileTree(dir: sqoopThirdPartyLib, include: '*.jar')
@ -352,6 +353,7 @@ tasks.withType(Test) {
}
forkEvery forkEveryDefault
ignoreFailures ignoreTestFailures
}
task kerberizedTest (type: Test){
@ -366,6 +368,7 @@ task kerberizedTest (type: Test){
includeCategories 'org.apache.sqoop.testcategories.KerberizedTest'
}
forkEvery 1
ignoreFailures ignoreTestFailures
}
test.finalizedBy(kerberizedTest)