@@ -21,10 +21,11 @@ class CommunityBuildTest {
21
21
* This test reads the compiler version from community-build/dotty-bootstrapped.version
22
22
* and expects community-build/sbt-dotty-sbt to set the compiler plugin.
23
23
*
24
- * @param project The project name, should be a git submodule in community-build/
25
- * @param command The sbt command used to build the project
24
+ * @param project The project name, should be a git submodule in community-build/
25
+ * @param command The sbt command used to test the project
26
+ * @param updateCommand The sbt command used to update the project
26
27
*/
27
- def test (project : String , command : String ): Unit = {
28
+ def test (project : String , testCommand : String , updateCommand : String ): Unit = {
28
29
def log (msg : String ) = println(Console .GREEN + msg + Console .RESET )
29
30
30
31
log(s " Building $project with dotty-bootstrapped $compilerVersion... " )
@@ -59,7 +60,7 @@ class CommunityBuildTest {
59
60
val arguments = Seq (
60
61
" -sbt-version" , " 1.2.7" ,
61
62
s " --addPluginSbtFile= $pluginFilePath" ,
62
- s " ;clean ;set updateOptions in Global ~= (_.withLatestSnapshots(false)) ;++ $compilerVersion! $command "
63
+ s " ;clean ;set updateOptions in Global ~= (_.withLatestSnapshots(false)) ;++ $compilerVersion! $testCommand "
63
64
)
64
65
65
66
val exitCode = exec(" sbt" , arguments : _* )
@@ -82,71 +83,84 @@ class CommunityBuildTest {
82
83
}
83
84
84
85
@ Test def algebra = test(
85
- project = " algebra" ,
86
- command = " coreJVM/compile"
86
+ project = " algebra" ,
87
+ testCommand = " coreJVM/compile" ,
88
+ updateCommand = " coreJVM/update"
87
89
)
88
90
89
91
@ Test def scalacheck = test(
90
- project = " scalacheck" ,
91
- command = " jvm/test:compile"
92
+ project = " scalacheck" ,
93
+ testCommand = " jvm/test:compile" ,
94
+ updateCommand = " jvm/test:update"
92
95
)
93
96
94
97
@ Test def scalatest = test(
95
- project = " scalatest" ,
96
- command = " scalatest/compile"
98
+ project = " scalatest" ,
99
+ testCommand = " scalatest/compile" ,
100
+ updateCommand = " scalatest/update"
97
101
)
98
102
99
103
@ Test def scopt = test(
100
- project = " scopt" ,
101
- command = " scoptJVM/compile"
104
+ project = " scopt" ,
105
+ testCommand = " scoptJVM/compile" ,
106
+ updateCommand = " scoptJVM/update"
102
107
)
103
108
104
109
@ Test def scalap = test(
105
- project = " scalap" ,
106
- command = " scalap/compile"
110
+ project = " scalap" ,
111
+ testCommand = " scalap/compile" ,
112
+ updateCommand = " scalap/update"
107
113
)
108
114
109
115
@ Test def squants = test(
110
- project = " squants" ,
111
- command = " squantsJVM/compile"
116
+ project = " squants" ,
117
+ testCommand = " squantsJVM/compile" ,
118
+ updateCommand = " squantsJVM/update"
112
119
)
113
120
114
121
@ Test def betterfiles = test(
115
- project = " betterfiles" ,
116
- command = " dotty-community-build/compile"
122
+ project = " betterfiles" ,
123
+ testCommand = " dotty-community-build/compile" ,
124
+ updateCommand = " dotty-community-build/update"
117
125
)
118
126
119
127
@ Test def ScalaPB = test(
120
- project = " ScalaPB" ,
121
- command = " dotty-community-build/compile"
128
+ project = " ScalaPB" ,
129
+ testCommand = " dotty-community-build/compile" ,
130
+ updateCommand = " dotty-community-build/update"
122
131
)
123
132
124
133
@ Test def minitest = test(
125
- project = " minitest" ,
126
- command = " dotty-community-build/compile"
134
+ project = " minitest" ,
135
+ testCommand = " dotty-community-build/compile" ,
136
+ updateCommand = " dotty-community-build/update"
127
137
)
128
138
129
139
@ Test def fastparse = test(
130
- project = " fastparse" ,
131
- command = " fastparseJVM/compile"
140
+ project = " fastparse" ,
141
+ testCommand = " fastparseJVM/compile" ,
142
+ updateCommand = " fastparseJVM/update"
132
143
)
133
144
134
145
// TODO: revert to sourcecodeJVM/test
135
146
@ Test def sourcecode = test(
136
- project = " sourcecode" ,
137
- command = " sourcecodeJVM/compile"
147
+ project = " sourcecode" ,
148
+ testCommand = " sourcecodeJVM/compile" ,
149
+ updateCommand = " sourcecodeJVM/update"
138
150
)
139
151
140
152
// TODO @smarter?
141
153
// @Test def stdLib213 = test(
142
- // project = "stdLib213",
143
- // command = "library/compile"
154
+ // project = "stdLib213",
155
+ // testCommand = "library/compile",
156
+ // updateCommand = "library/update"
144
157
// )
145
158
146
159
// TODO @oderky? It got broken by #5458
147
160
// @Test def pdbp = test(
148
- // project = "pdbp",
149
- // command = "compile"
161
+ // project = "pdbp",
162
+ // testCommand = "compile",
163
+ // updateCommand = "update"
150
164
// )
151
165
}
152
166
@@ -155,6 +169,6 @@ class UpdateCategory
155
169
156
170
@ Category (Array (classOf [UpdateCategory ]))
157
171
class CommunityBuildUpdate extends CommunityBuildTest {
158
- override def test (project : String , command : String ): Unit =
159
- super .test(project, command.split( " / " ).head + " /update " )
172
+ override def test (project : String , testCommand : String , updateCommand : String ): Unit =
173
+ super .test(project, updateCommand, null )
160
174
}
0 commit comments