Skip to content

Commit 9350eef

Browse files
authored
Run test sub-command integration tests on default JVM settings, rather than explicitly JDK 11 (#3592)
1 parent 44649d2 commit 9350eef

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

modules/integration/src/test/scala/scala/cli/integration/TestTestDefinitions.scala

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ import scala.cli.integration.Constants.munitVersion
77

88
abstract class TestTestDefinitions extends ScalaCliSuite with TestScalaVersionArgs {
99
_: TestScalaVersion =>
10-
protected val jvmOptions: Seq[String] =
11-
// seems munit requires this with Scala 3
12-
if (actualScalaVersion.startsWith("3.")) Seq("--jvm", "11")
13-
else Nil
14-
protected lazy val baseExtraOptions: Seq[String] = TestUtil.extraOptions ++ jvmOptions
15-
protected lazy val extraOptions: Seq[String] = scalaVersionArgs ++ baseExtraOptions
16-
17-
private val utestVersion = "0.8.3"
10+
protected lazy val extraOptions: Seq[String] = scalaVersionArgs ++ TestUtil.extraOptions
11+
private val utestVersion = "0.8.3"
1812

1913
def successfulTestInputs(directivesString: String =
2014
s"//> using dep org.scalameta::munit::$munitVersion"): TestInputs = TestInputs(

modules/integration/src/test/scala/scala/cli/integration/TestTestsDefault.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ class TestTestsDefault extends TestTestDefinitions with TestDefault {
3434
)
3535

3636
inputs.fromRoot { root =>
37-
val compileRes = os.proc(TestUtil.cli, "compile", "--print-class-path", baseExtraOptions, ".")
37+
val compileRes = os.proc(TestUtil.cli, "compile", "--print-class-path", extraOptions, ".")
3838
.call(cwd = root)
3939
val cp = compileRes.out.trim().split(File.pathSeparator)
4040
expect(cp.length == 1) // only class dir, no scala JARs
41-
os.proc(TestUtil.cli, "test", baseExtraOptions, ".")
41+
os.proc(TestUtil.cli, "test", extraOptions, ".")
4242
.call(cwd = root, stdout = os.Inherit)
4343
}
4444
}

0 commit comments

Comments
 (0)