@@ -174,6 +174,8 @@ object Build {
174
174
fork in Test := true ,
175
175
parallelExecution in Test := false ,
176
176
177
+ outputStrategy := Some (StdoutOutput ),
178
+
177
179
// enable verbose exception messages for JUnit
178
180
testOptions in Test += Tests .Argument (TestFrameworks .JUnit , " -a" , " -v" ),
179
181
)
@@ -335,7 +337,6 @@ object Build {
335
337
)
336
338
337
339
lazy val commonBenchmarkSettings = Seq (
338
- outputStrategy := Some (StdoutOutput ),
339
340
mainClass in (Jmh , run) := Some (" dotty.tools.benchmarks.Bench" ), // custom main for jmh:run
340
341
javaOptions += " -DBENCH_COMPILER_CLASS_PATH=" + Attributed .data((fullClasspath in (`dotty-bootstrapped`, Compile )).value).mkString(" " , File .pathSeparator, " " ),
341
342
javaOptions += " -DBENCH_CLASS_PATH=" + Attributed .data((fullClasspath in (`dotty-library-bootstrapped`, Compile )).value).mkString(" " , File .pathSeparator, " " )
@@ -404,7 +405,6 @@ object Build {
404
405
405
406
def dottyDocSettings (implicit mode : Mode ) = Seq (
406
407
connectInput in run := true ,
407
- outputStrategy := Some (StdoutOutput ),
408
408
409
409
javaOptions ++= (javaOptions in `dotty-compiler`).value,
410
410
@@ -466,7 +466,6 @@ object Build {
466
466
lazy val commonDottyCompilerSettings = Seq (
467
467
// set system in/out for repl
468
468
connectInput in run := true ,
469
- outputStrategy := Some (StdoutOutput ),
470
469
471
470
// Generate compiler.properties, used by sbt
472
471
resourceGenerators in Compile += Def .task {
@@ -526,22 +525,19 @@ object Build {
526
525
(sourceManaged in Compile ).value
527
526
}
528
527
val externalDeps = externalCompilerClasspathTask.value
529
- val externalJSDeps = (externalDependencyClasspath in (LocalProject (" dotty-library-bootstrappedJS" ), Compile )).value
530
528
val jars = packageAll.value
531
529
532
530
Seq (
533
531
" -Ddotty.tests.dottyCompilerManagedSources=" + managedSrcDir,
534
532
" -Ddotty.tests.classes.dottyInterfaces=" + jars(" dotty-interfaces" ),
535
533
" -Ddotty.tests.classes.dottyLibrary=" + jars(" dotty-library" ),
536
- " -Ddotty.tests.classes.dottyLibraryJS=" + jars(" dotty-library-js" ),
537
534
" -Ddotty.tests.classes.dottyCompiler=" + jars(" dotty-compiler" ),
538
535
" -Ddotty.tests.classes.tastyCore=" + jars(" tasty-core" ),
539
536
" -Ddotty.tests.classes.compilerInterface=" + findArtifactPath(externalDeps, " compiler-interface" ),
540
537
" -Ddotty.tests.classes.scalaLibrary=" + findArtifactPath(externalDeps, " scala-library" ),
541
538
" -Ddotty.tests.classes.scalaAsm=" + findArtifactPath(externalDeps, " scala-asm" ),
542
539
" -Ddotty.tests.classes.jlineTerminal=" + findArtifactPath(externalDeps, " jline-terminal" ),
543
540
" -Ddotty.tests.classes.jlineReader=" + findArtifactPath(externalDeps, " jline-reader" ),
544
- " -Ddotty.tests.classes.scalaJSLibrary=" + findArtifactPath(externalJSDeps, " scalajs-library_2.13" ),
545
541
)
546
542
},
547
543
@@ -708,8 +704,7 @@ object Build {
708
704
// running the compiler, we should always have the bootstrapped
709
705
// library on the compiler classpath since the non-bootstrapped one
710
706
// may not be binary-compatible.
711
- " dotty-library" -> packageBin.in(`dotty-library-bootstrapped`, Compile ).value,
712
- " dotty-library-js" -> packageBin.in(`dotty-library-bootstrappedJS`, Compile ).value,
707
+ " dotty-library" -> packageBin.in(`dotty-library-bootstrapped`, Compile ).value
713
708
).mapValues(_.getAbsolutePath)
714
709
}
715
710
}.value,
@@ -1144,6 +1139,26 @@ object Build {
1144
1139
}
1145
1140
)
1146
1141
1142
+ lazy val sjsCompilerTests = project.in(file(" sjs-compiler-tests" )).
1143
+ dependsOn(`dotty-compiler` % " test->test" ).
1144
+ settings(
1145
+ commonNonBootstrappedSettings,
1146
+
1147
+ // Change the baseDirectory when running the tests
1148
+ baseDirectory in Test := baseDirectory.value.getParentFile,
1149
+
1150
+ javaOptions ++= (javaOptions in `dotty-compiler`).value,
1151
+ javaOptions ++= {
1152
+ val externalJSDeps = (externalDependencyClasspath in (`dotty-library-bootstrappedJS`, Compile )).value
1153
+ val dottyLibraryJSJar = (packageBin in (`dotty-library-bootstrappedJS`, Compile )).value.getAbsolutePath
1154
+
1155
+ Seq (
1156
+ " -Ddotty.tests.classes.dottyLibraryJS=" + dottyLibraryJSJar,
1157
+ " -Ddotty.tests.classes.scalaJSLibrary=" + findArtifactPath(externalJSDeps, " scalajs-library_2.13" ),
1158
+ )
1159
+ },
1160
+ )
1161
+
1147
1162
lazy val `dotty-bench` = project.in(file(" bench" )).asDottyBench(NonBootstrapped )
1148
1163
lazy val `dotty-bench-bootstrapped` = project.in(file(" bench" )).asDottyBench(Bootstrapped )
1149
1164
lazy val `dotty-bench-run` = project.in(file(" bench-run" )).asDottyBench(Bootstrapped )
0 commit comments