Skip to content

Commit ad82bec

Browse files
Split CB tests in 5 groups
1 parent 223cb42 commit ad82bec

File tree

3 files changed

+35
-36
lines changed

3 files changed

+35
-36
lines changed

.travis.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,11 @@ language: scala
33
jdk: oraclejdk8
44
jobs:
55
include:
6-
- stage: publish-local
7-
script: sbt community-build/prepareCommunityBuild
8-
- stage: integration-tests
9-
script: sbt "community-build/testOnly -- *algebra"
10-
- script: sbt "community-build/testOnly -- *betterfiles"
11-
- script: sbt "community-build/testOnly -- *scalacheck"
12-
- script: sbt "community-build/testOnly -- *ScalaPB"
13-
- script: sbt "community-build/testOnly -- *scalatest"
14-
- script: sbt "community-build/testOnly -- *scopt"
15-
- script: sbt "community-build/testOnly -- *squants"
16-
- script: sbt "community-build/testOnly -- *collectionstrawman"
17-
- script: sbt "community-build/testOnly -- *scalap"
18-
- script: sbt "community-build/testOnly -- *minitest"
19-
- script: sbt "community-build/testOnly -- *fastparse"
20-
- script: sbt "community-build/testOnly -- *stdLib213"
21-
- script: sbt "community-build/testOnly -- *pdbp"
22-
- script: sbt "community-build/testOnly -- *sourcecode"
6+
script: sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTest1
7+
- script: sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTest2
8+
- script: sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTest3
9+
- script: sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTest4
10+
- script: sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTest5
2311

2412
cache:
2513
directories:

community-build/src/test/scala/dotty/communitybuild/CommunityBuildTest.scala

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import java.nio.charset.StandardCharsets.UTF_8
66
import org.junit.{Ignore, Test}
77
import org.junit.Assert.{assertEquals, fail}
88

9-
class CommunityBuildTest {
9+
abstract class BuildTest {
1010
lazy val communitybuildDir: Path = Paths.get(sys.props("user.dir") + "/community-build/")
1111

1212
lazy val compilerVersion: String = {
@@ -70,9 +70,10 @@ class CommunityBuildTest {
7070
|
7171
|""".stripMargin)
7272
}
73-
7473
}
74+
}
7575

76+
class CommunityBuildTest1 extends BuildTest {
7677
@Test def algebra = test(
7778
project = "algebra",
7879
command = "coreJVM/compile"
@@ -87,12 +88,9 @@ class CommunityBuildTest {
8788
project = "scalacheck",
8889
command = "jvm/test:compile"
8990
)
91+
}
9092

91-
@Test def ScalaPB = test(
92-
project = "ScalaPB",
93-
command = "dottyCompile"
94-
)
95-
93+
class CommunityBuildTest2 extends BuildTest {
9694
@Test def scalatest = test(
9795
project = "scalatest",
9896
command = "scalatest/compile"
@@ -103,6 +101,13 @@ class CommunityBuildTest {
103101
command = "scoptJVM/compile"
104102
)
105103

104+
@Test def scalap = test(
105+
project = "scalap",
106+
command = "scalap/compile"
107+
)
108+
}
109+
110+
class CommunityBuildTest3 extends BuildTest {
106111
@Test def squants = test(
107112
project = "squants",
108113
command = "squantsJVM/compile"
@@ -113,11 +118,13 @@ class CommunityBuildTest {
113118
command = "dottyCompile"
114119
)
115120

116-
@Test def scalap = test(
117-
project = "scalap",
118-
command = "scalap/compile"
121+
@Test def ScalaPB = test(
122+
project = "ScalaPB",
123+
command = "dottyCompile"
119124
)
125+
}
120126

127+
class CommunityBuildTest4 extends BuildTest {
121128
@Test def minitest = test(
122129
project = "minitest",
123130
command = "dottyCompile"
@@ -128,6 +135,14 @@ class CommunityBuildTest {
128135
command = "fastparseJVM/compile"
129136
)
130137

138+
// TODO: revert to sourcecodeJVM/test
139+
@Test def sourcecode = test(
140+
project = "sourcecode",
141+
command = "sourcecodeJVM/compile"
142+
)
143+
}
144+
145+
class CommunityBuildTest5 extends BuildTest {
131146
// TODO @smarter?
132147
// @Test def stdLib213 = test(
133148
// project = "stdLib213",
@@ -139,10 +154,4 @@ class CommunityBuildTest {
139154
// project = "pdbp",
140155
// command = "compile"
141156
// )
142-
143-
// TODO: revert to sourcecodeJVM/test
144-
@Test def sourcecode = test(
145-
project = "sourcecode",
146-
command = "sourcecodeJVM/compile"
147-
)
148157
}

project/Build.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,11 +1016,12 @@ object Build {
10161016
}.dependsOn(compile in Compile).evaluated
10171017
)
10181018

1019-
lazy val `prepare-community-build` = taskKey[Unit]("Publish local the compiler and the sbt plugin. Also store the versions of the published local artefacts in two files, community-build/{dotty-bootstrapped.version,sbt-dotty.sbt}.")
1019+
lazy val `prepare-comunity-build` = taskKey[Unit]("Publish local the compiler and the sbt plugin. Also store the versions of the published local artefacts in two files, community-build/{dotty-bootstrapped.version,sbt-dotty.sbt}.")
10201020

10211021
lazy val `community-build` = project.in(file("community-build")).
10221022
settings(
1023-
`prepare-community-build` := {
1023+
scalaVersion := scalacVersion,
1024+
`prepare-comunity-build` := {
10241025
(publishLocal in `dotty-sbt-bridge`).value
10251026
(publishLocal in `dotty-interfaces`).value
10261027
(publishLocal in `dotty-compiler-bootstrapped`).value
@@ -1034,7 +1035,8 @@ object Build {
10341035
IO.write(baseDirectory.value / "sbt-dotty.sbt", pluginText)
10351036
IO.write(baseDirectory.value / "dotty-bootstrapped.version", dottyVersion)
10361037
},
1037-
scalaVersion := scalacVersion,
1038+
(Test / testOnly) := ((Test / testOnly) dependsOn `prepare-comunity-build`).evaluated,
1039+
(Test / test ) := ((Test / test ) dependsOn `prepare-comunity-build`).value,
10381040
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
10391041
testOptions in Test += Tests.Argument(TestFrameworks.JUnit, "-a", "-v")
10401042
)

0 commit comments

Comments
 (0)