You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/10/25 12:51:18 UTC

[lucene] branch main updated: LUCENE-9660: add tests.neverUpToDate=true option which, by default, makes test tasks always execute. (#410)

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new 81f5b4d  LUCENE-9660: add tests.neverUpToDate=true option which, by default, makes test tasks always execute. (#410)
81f5b4d is described below

commit 81f5b4d6423958890876bd755e4ed68c73fbb612
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Mon Oct 25 14:51:11 2021 +0200

    LUCENE-9660: add tests.neverUpToDate=true option which, by default, makes test tasks always execute. (#410)
---
 gradle/testing/defaults-tests.gradle | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gradle/testing/defaults-tests.gradle b/gradle/testing/defaults-tests.gradle
index a840124..986e777 100644
--- a/gradle/testing/defaults-tests.gradle
+++ b/gradle/testing/defaults-tests.gradle
@@ -49,6 +49,9 @@ allprojects {
           [propName: 'tests.jvmargs',
            value: { -> propertyOrEnvOrDefault("tests.jvmargs", "TEST_JVM_ARGS", "-XX:TieredStopAtLevel=1") },
            description: "Arguments passed to each forked JVM."],
+          // Other settings.
+          [propName: 'tests.neverUpToDate', value: true,
+           description: "Make test tasks always fail the up-to-date checks (rerun) even if the inputs have not changed."],
       ]
 
       // Resolves test option's value.
@@ -90,6 +93,11 @@ allprojects {
         testOutputsDir = file("${reports.junitXml.destination}/outputs")
       }
 
+      // LUCENE-9660: Make it possible to always rerun tests, even if they're incrementally up-to-date.
+      if (resolvedTestOption("tests.neverUpToDate").toBoolean()) {
+        outputs.upToDateWhen { false }
+      }
+
       maxParallelForks = resolvedTestOption("tests.jvms") as Integer
       if (verboseMode && maxParallelForks != 1) {
         logger.lifecycle("tests.jvm forced to 1 in verbose mode.")