From ed195c01199c5e5be27e4552fa47f795d70707d1 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Wed, 13 Feb 2019 07:36:15 +0100 Subject: [PATCH] Fix --update-checkfiles The issue was that when the key `dotty.tests.updateCheckfiles` was not set `testsUpdateCheckfile` had the value `true`. By default it should not be enabled. --- compiler/test/dotty/Properties.scala | 3 ++- project/Build.scala | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/test/dotty/Properties.scala b/compiler/test/dotty/Properties.scala index 8317c3acf881..d293a11dea39 100644 --- a/compiler/test/dotty/Properties.scala +++ b/compiler/test/dotty/Properties.scala @@ -21,7 +21,8 @@ object Properties { val testsFilter: Option[String] = sys.props.get("dotty.tests.filter") /** Tests should override the checkfiles with the current output */ - val testsUpdateCheckfile: Boolean = propIsNullOrTrue("dotty.tests.updateCheckfiles") + val testsUpdateCheckfile: Boolean = + sys.props.getOrElse("dotty.tests.updateCheckfiles", "FALSE") == "TRUE" /** When set, the run tests are only compiled - not run, a warning will be * issued diff --git a/project/Build.scala b/project/Build.scala index 834b40c96907..1ecda3cecca5 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -542,7 +542,7 @@ object Build { val args1 = if (updateCheckfile | fromTasty) args.filter(x => x != "--update-checkfiles" && x != "--from-tasty") else args val test = if (fromTasty) "dotty.tools.dotc.FromTastyTests" else "dotty.tools.dotc.*CompilationTests" val cmd = s" $test -- --exclude-categories=dotty.SlowTests" + - (if (updateCheckfile) " -Ddotty.tests.updateCheckfiles=true" else "") + + (if (updateCheckfile) " -Ddotty.tests.updateCheckfiles=TRUE" else "") + (if (args1.nonEmpty) " -Ddotty.tests.filter=" + args1.mkString(" ") else "") (testOnly in Test).toTask(cmd) }.evaluated,