@@ -2095,6 +2095,8 @@ object Build {
20952095 // Add the source directories for the compiler (non-boostrapped)
20962096 Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
20972097 Compile / unmanagedSourceDirectories += baseDirectory.value / " src-non-bootstrapped" ,
2098+ // Add the test directories for the compiler (non-bootstrapped)
2099+ Test / unmanagedSourceDirectories := Seq (baseDirectory.value / " test" ),
20982100 // All the dependencies needed by the compiler
20992101 libraryDependencies ++= Seq (
21002102 " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
@@ -2214,6 +2216,36 @@ object Build {
22142216 sjsSources
22152217 } (Set (scalaJSIRSourcesJar)).toSeq
22162218 }.taskValue,
2219+ // Configuration of the test suite
2220+ Test / forkOptions := (Test / forkOptions).value
2221+ .withWorkingDirectory((ThisBuild / baseDirectory).value),
2222+ Test / test := (Test / testOnly).toTask(" -- --exclude-categories=dotty.VulpixMetaTests" ).value,
2223+ Test / testOptions += Tests .Argument (
2224+ TestFrameworks .JUnit ,
2225+ " --run-listener=dotty.tools.ContextEscapeDetector" , " --exclude-categories=dotty.BootstrappedOnlyTests" ,
2226+ ),
2227+ Test / javaOptions ++= {
2228+ val log = streams.value.log
2229+ val managedSrcDir = {
2230+ // Populate the directory
2231+ (Compile / managedSources).value
2232+
2233+ (Compile / sourceManaged).value
2234+ }
2235+ val externalDeps = (ThisProject / Runtime / externalDependencyClasspath).value
2236+ Seq (
2237+ s " -Ddotty.tests.dottyCompilerManagedSources= ${managedSrcDir}" ,
2238+ s " -Ddotty.tests.classes.dottyInterfaces= ${(`scala3-interfaces` / Compile / packageBin).value}" ,
2239+ s " -Ddotty.tests.classes.dottyCompiler= ${(ThisProject / Compile / packageBin).value}" ,
2240+ s " -Ddotty.tests.classes.tastyCore= ${(`tasty-core-nonbootstrapped` / Compile / packageBin).value}" ,
2241+ s " -Ddotty.tests.classes.compilerInterface= ${findArtifactPath(externalDeps, " compiler-interface" )}" ,
2242+ s " -Ddotty.tests.classes.scalaLibrary= ${(`scala-library-nonbootstrapped` / Compile / packageBin).value}" ,
2243+ s " -Ddotty.tests.classes.scalaAsm= ${findArtifactPath(externalDeps, " scala-asm" )}" ,
2244+ s " -Ddotty.tests.classes.jlineTerminal= ${findArtifactPath(externalDeps, " jline-terminal" )}" ,
2245+ s " -Ddotty.tests.classes.jlineReader= ${findArtifactPath(externalDeps, " jline-reader" )}" ,
2246+ s " -Ddotty.tools.dotc.semanticdb.test= ${(ThisBuild / baseDirectory).value/ " tests" / " semanticdb" }" ,
2247+ )
2248+ },
22172249 )
22182250
22192251 /* Configuration of the org.scala-lang:scala3-compiler_3:*.**.**-bootstrapped project */
0 commit comments