Skip to content

Commit 8d26619

Browse files
committed
Enable -Ycheck:all in Jenkins.
Done by setting an environment variable and checking it in runtime. This enables Ycheck:all for all kinds of tests, including partest.
1 parent fa3265e commit 8d26619

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

project/Build.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ object DottyBuild extends Build {
88

99
val travisMemLimit = List("-Xmx1g", "-Xss2m")
1010

11-
val TRAVIS_BUILD = "dotty.travis.build"
11+
val JENKINS_BUILD = "dotty.jenkins.build"
1212

1313
val agentOptions = List(
1414
// "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
@@ -104,8 +104,8 @@ object DottyBuild extends Build {
104104
// System.err.println("BOOTPATH: " + fullpath)
105105

106106
val travis_build = // propagate if this is a travis build
107-
if (sys.props.isDefinedAt(TRAVIS_BUILD))
108-
List(s"-D$TRAVIS_BUILD=${sys.props(TRAVIS_BUILD)}") ::: travisMemLimit
107+
if (sys.props.isDefinedAt(JENKINS_BUILD))
108+
List(s"-D$JENKINS_BUILD=${sys.props(JENKINS_BUILD)}") ::: travisMemLimit
109109
else
110110
List()
111111

@@ -156,8 +156,8 @@ object DottyBuild extends Build {
156156
// System.err.println("BOOTPATH: " + fullpath)
157157

158158
val travis_build = // propagate if this is a travis build
159-
if (sys.props.isDefinedAt(TRAVIS_BUILD))
160-
List(s"-D$TRAVIS_BUILD=${sys.props(TRAVIS_BUILD)}")
159+
if (sys.props.isDefinedAt(JENKINS_BUILD))
160+
List(s"-D$JENKINS_BUILD=${sys.props(JENKINS_BUILD)}")
161161
else
162162
List()
163163
val res = agentOptions ::: travis_build ::: fullpath

scripts/common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ update() {
1414

1515
export LC_ALL=en_US.UTF-8
1616

17-
sbtArgs="-Ddotty.travis.build=yes -Dfile.encoding=UTF-8 -ivy $baseDir/ivy2 -Dsbt.global.base=$HOME/.sbt/0.13 -sbt-dir $HOME/.sbt/0.13"
17+
sbtArgs="-Ddotty.jenkins.build=yes -Dfile.encoding=UTF-8 -ivy $baseDir/ivy2 -Dsbt.global.base=$HOME/.sbt/0.13 -sbt-dir $HOME/.sbt/0.13"

test/dotc/tests.scala

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import org.junit.experimental.categories._
88

99
class tests extends CompilerTest {
1010

11+
def isRunByJenkins: Boolean = sys.props.isDefinedAt("dotty.jenkins.build")
12+
1113
val noCheckOptions = List(
1214
// "-verbose",
1315
// "-Ylog:frontend",
@@ -20,9 +22,12 @@ class tests extends CompilerTest {
2022

2123
implicit val defaultOptions = noCheckOptions ++ List(
2224
"-Yno-deep-subtypes", "-Yno-double-bindings",
23-
"-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef",
24-
"-d", defaultOutputDir
25-
)
25+
"-d", defaultOutputDir) ++ {
26+
if (isRunByJenkins) List("-Ycheck:all")
27+
else List("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef")
28+
}
29+
30+
2631
val testPickling = List("-Xprint-types", "-Ytest-pickler", "-Ystop-after:pickler")
2732

2833
val twice = List("#runs", "2")

0 commit comments

Comments
 (0)