@@ -2125,6 +2125,8 @@ object Build {
21252125 // Add the source directories for the compiler (non-boostrapped)
21262126 Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
21272127 Compile / unmanagedSourceDirectories += baseDirectory.value / " src-non-bootstrapped" ,
2128+ // Add the test directories for the compiler (non-bootstrapped)
2129+ Test / unmanagedSourceDirectories := Seq (baseDirectory.value / " test" ),
21282130 // All the dependencies needed by the compiler
21292131 libraryDependencies ++= Seq (
21302132 " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
@@ -2245,6 +2247,36 @@ object Build {
22452247 sjsSources
22462248 } (Set (scalaJSIRSourcesJar)).toSeq
22472249 }.taskValue,
2250+ // Configuration of the test suite
2251+ Test / forkOptions := (Test / forkOptions).value
2252+ .withWorkingDirectory((ThisBuild / baseDirectory).value),
2253+ Test / test := (Test / testOnly).toTask(" -- --exclude-categories=dotty.VulpixMetaTests" ).value,
2254+ Test / testOptions += Tests .Argument (
2255+ TestFrameworks .JUnit ,
2256+ " --run-listener=dotty.tools.ContextEscapeDetector" , " --exclude-categories=dotty.BootstrappedOnlyTests" ,
2257+ ),
2258+ Test / javaOptions ++= {
2259+ val log = streams.value.log
2260+ val managedSrcDir = {
2261+ // Populate the directory
2262+ (Compile / managedSources).value
2263+
2264+ (Compile / sourceManaged).value
2265+ }
2266+ val externalDeps = (ThisProject / Runtime / externalDependencyClasspath).value
2267+ Seq (
2268+ s " -Ddotty.tests.dottyCompilerManagedSources= ${managedSrcDir}" ,
2269+ s " -Ddotty.tests.classes.dottyInterfaces= ${(`scala3-interfaces` / Compile / packageBin).value}" ,
2270+ s " -Ddotty.tests.classes.dottyCompiler= ${(ThisProject / Compile / packageBin).value}" ,
2271+ s " -Ddotty.tests.classes.tastyCore= ${(`tasty-core-nonbootstrapped` / Compile / packageBin).value}" ,
2272+ s " -Ddotty.tests.classes.compilerInterface= ${findArtifactPath(externalDeps, " compiler-interface" )}" ,
2273+ s " -Ddotty.tests.classes.scalaLibrary= ${(`scala-library-nonbootstrapped` / Compile / packageBin).value}" ,
2274+ s " -Ddotty.tests.classes.scalaAsm= ${findArtifactPath(externalDeps, " scala-asm" )}" ,
2275+ s " -Ddotty.tests.classes.jlineTerminal= ${findArtifactPath(externalDeps, " jline-terminal" )}" ,
2276+ s " -Ddotty.tests.classes.jlineReader= ${findArtifactPath(externalDeps, " jline-reader" )}" ,
2277+ s " -Ddotty.tools.dotc.semanticdb.test= ${(ThisBuild / baseDirectory).value/ " tests" / " semanticdb" }" ,
2278+ )
2279+ },
22482280 )
22492281
22502282 /* Configuration of the org.scala-lang:scala3-compiler_3:*.**.**-bootstrapped project */
0 commit comments