Skip to content

Commit ed195c0

Browse files
committed
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.
1 parent 58b8aaa commit ed195c0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

compiler/test/dotty/Properties.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ object Properties {
2121
val testsFilter: Option[String] = sys.props.get("dotty.tests.filter")
2222

2323
/** Tests should override the checkfiles with the current output */
24-
val testsUpdateCheckfile: Boolean = propIsNullOrTrue("dotty.tests.updateCheckfiles")
24+
val testsUpdateCheckfile: Boolean =
25+
sys.props.getOrElse("dotty.tests.updateCheckfiles", "FALSE") == "TRUE"
2526

2627
/** When set, the run tests are only compiled - not run, a warning will be
2728
* issued

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ object Build {
542542
val args1 = if (updateCheckfile | fromTasty) args.filter(x => x != "--update-checkfiles" && x != "--from-tasty") else args
543543
val test = if (fromTasty) "dotty.tools.dotc.FromTastyTests" else "dotty.tools.dotc.*CompilationTests"
544544
val cmd = s" $test -- --exclude-categories=dotty.SlowTests" +
545-
(if (updateCheckfile) " -Ddotty.tests.updateCheckfiles=true" else "") +
545+
(if (updateCheckfile) " -Ddotty.tests.updateCheckfiles=TRUE" else "") +
546546
(if (args1.nonEmpty) " -Ddotty.tests.filter=" + args1.mkString(" ") else "")
547547
(testOnly in Test).toTask(cmd)
548548
}.evaluated,

0 commit comments

Comments
 (0)