Repository: sqoop Updated Branches: refs/heads/trunk f8fe691e2 -> 6a159ed28
SQOOP-3414: Introduce a Gradle build parameter to set the ignoreTestFailures of the test tasks This closes #59 (Szabolcs Vasas via Boglarka Egyed) Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/6a159ed2 Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/6a159ed2 Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/6a159ed2 Branch: refs/heads/trunk Commit: 6a159ed282c1816452a46dbc7acc2a56b5d2dc46 Parents: f8fe691 Author: Boglarka Egyed <[email protected]> Authored: Wed Nov 28 10:56:46 2018 +0100 Committer: Boglarka Egyed <[email protected]> Committed: Wed Nov 28 10:56:46 2018 +0100 ---------------------------------------------------------------------- COMPILING.txt | 10 ++++++++++ build.gradle | 3 +++ 2 files changed, 13 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sqoop/blob/6a159ed2/COMPILING.txt ---------------------------------------------------------------------- diff --git a/COMPILING.txt b/COMPILING.txt index 348dae0..f5d7e79 100644 --- a/COMPILING.txt +++ b/COMPILING.txt @@ -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 http://git-wip-us.apache.org/repos/asf/sqoop/blob/6a159ed2/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index c7372e8..f0beec9 100644 --- a/build.gradle +++ b/build.gradle @@ -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)
