Skip to content

Commit 617a9a4

Browse files
committed
vulpix: pass -classpath to javac too
Otherwise the tastyBootstrap test failed when compiling the .java files added in the previous commit that depend on scala-asm.
1 parent 0abd076 commit 617a9a4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
336336
val fullArgs = Array(
337337
"javac",
338338
"-encoding", "UTF-8",
339-
"-classpath",
340-
s"${Properties.scalaLibrary}${JFile.pathSeparator}${targetDir.getAbsolutePath}"
341-
) ++ flags.all.takeRight(2) ++ fs
339+
) ++ flags.javacFlags ++ fs
342340

343341
val process = Runtime.getRuntime.exec(fullArgs)
344342
val output = Source.fromInputStream(process.getErrorStream).mkString

compiler/test/dotty/tools/vulpix/TestFlags.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ final case class TestFlags(
2020
TestFlags(defaultClassPath, s"$runClassPath${JFile.pathSeparator}$classPath", options)
2121

2222
def all: Array[String] = Array("-classpath", defaultClassPath) ++ options
23+
24+
/** Subset of the flags that should be passed to javac. */
25+
def javacFlags: Array[String] = {
26+
val flags = all
27+
val cp = flags.dropWhile(_ != "-classpath").take(2)
28+
val output = flags.dropWhile(_ != "-d").take(2)
29+
cp ++ output
30+
}
2331
}
2432

2533
object TestFlags {

0 commit comments

Comments
 (0)