Skip to content

Commit 162d748

Browse files
authored
Merge pull request #5911 from dotty-staging/fix-update-checkfiles
Fix --update-checkfiles
2 parents 58b8aaa + ed195c0 commit 162d748

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)