@@ -174,6 +174,8 @@ object Build {
174174 fork in Test := true ,
175175 parallelExecution in Test := false ,
176176
177+ outputStrategy := Some (StdoutOutput ),
178+
177179 // enable verbose exception messages for JUnit
178180 testOptions in Test += Tests .Argument (TestFrameworks .JUnit , " -a" , " -v" ),
179181 )
@@ -335,7 +337,6 @@ object Build {
335337 )
336338
337339 lazy val commonBenchmarkSettings = Seq (
338- outputStrategy := Some (StdoutOutput ),
339340 mainClass in (Jmh , run) := Some (" dotty.tools.benchmarks.Bench" ), // custom main for jmh:run
340341 javaOptions += " -DBENCH_COMPILER_CLASS_PATH=" + Attributed .data((fullClasspath in (`dotty-bootstrapped`, Compile )).value).mkString(" " , File .pathSeparator, " " ),
341342 javaOptions += " -DBENCH_CLASS_PATH=" + Attributed .data((fullClasspath in (`dotty-library-bootstrapped`, Compile )).value).mkString(" " , File .pathSeparator, " " )
@@ -404,7 +405,6 @@ object Build {
404405
405406 def dottyDocSettings (implicit mode : Mode ) = Seq (
406407 connectInput in run := true ,
407- outputStrategy := Some (StdoutOutput ),
408408
409409 javaOptions ++= (javaOptions in `dotty-compiler`).value,
410410
@@ -466,7 +466,6 @@ object Build {
466466 lazy val commonDottyCompilerSettings = Seq (
467467 // set system in/out for repl
468468 connectInput in run := true ,
469- outputStrategy := Some (StdoutOutput ),
470469
471470 // Generate compiler.properties, used by sbt
472471 resourceGenerators in Compile += Def .task {
@@ -1140,6 +1139,26 @@ object Build {
11401139 }
11411140 )
11421141
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+
11431162 lazy val `dotty-bench` = project.in(file(" bench" )).asDottyBench(NonBootstrapped )
11441163 lazy val `dotty-bench-bootstrapped` = project.in(file(" bench" )).asDottyBench(Bootstrapped )
11451164 lazy val `dotty-bench-run` = project.in(file(" bench-run" )).asDottyBench(Bootstrapped )
0 commit comments