@@ -2125,6 +2125,8 @@ object Build {
2125
2125
// Add the source directories for the compiler (non-boostrapped)
2126
2126
Compile / unmanagedSourceDirectories := Seq (baseDirectory.value / " src" ),
2127
2127
Compile / unmanagedSourceDirectories += baseDirectory.value / " src-non-bootstrapped" ,
2128
+ // Add the test directories for the compiler (non-bootstrapped)
2129
+ Test / unmanagedSourceDirectories := Seq (baseDirectory.value / " test" ),
2128
2130
// All the dependencies needed by the compiler
2129
2131
libraryDependencies ++= Seq (
2130
2132
" com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
@@ -2245,6 +2247,36 @@ object Build {
2245
2247
sjsSources
2246
2248
} (Set (scalaJSIRSourcesJar)).toSeq
2247
2249
}.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
+ },
2248
2280
)
2249
2281
2250
2282
/* Configuration of the org.scala-lang:scala3-compiler_3:*.**.**-bootstrapped project */
0 commit comments