Skip to content

Commit

Permalink
Enable -Ycheck:all in Jenkins.
Browse files Browse the repository at this point in the history
Done by setting an environment variable and checking it in runtime.
This enables Ycheck:all for all kinds of tests, including partest.
  • Loading branch information
DarkDimius committed Jul 20, 2015
1 parent fa3265e commit 8d26619
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
10 changes: 5 additions & 5 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object DottyBuild extends Build {

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

val TRAVIS_BUILD = "dotty.travis.build"
val JENKINS_BUILD = "dotty.jenkins.build"

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

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

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

val travis_build = // propagate if this is a travis build
if (sys.props.isDefinedAt(TRAVIS_BUILD))
List(s"-D$TRAVIS_BUILD=${sys.props(TRAVIS_BUILD)}")
if (sys.props.isDefinedAt(JENKINS_BUILD))
List(s"-D$JENKINS_BUILD=${sys.props(JENKINS_BUILD)}")
else
List()
val res = agentOptions ::: travis_build ::: fullpath
Expand Down
2 changes: 1 addition & 1 deletion scripts/common
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ update() {

export LC_ALL=en_US.UTF-8

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"
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"
11 changes: 8 additions & 3 deletions test/dotc/tests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import org.junit.experimental.categories._

class tests extends CompilerTest {

def isRunByJenkins: Boolean = sys.props.isDefinedAt("dotty.jenkins.build")

val noCheckOptions = List(
// "-verbose",
// "-Ylog:frontend",
Expand All @@ -20,9 +22,12 @@ class tests extends CompilerTest {

implicit val defaultOptions = noCheckOptions ++ List(
"-Yno-deep-subtypes", "-Yno-double-bindings",
"-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef",
"-d", defaultOutputDir
)
"-d", defaultOutputDir) ++ {
if (isRunByJenkins) List("-Ycheck:all")
else List("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef")
}


val testPickling = List("-Xprint-types", "-Ytest-pickler", "-Ystop-after:pickler")

val twice = List("#runs", "2")
Expand Down

0 comments on commit 8d26619

Please sign in to comment.