Restore integration-test/bin scripts for JAVA_CMD

This commit is contained in:
Domantas Petrauskas 2023-10-05 21:12:05 +03:00 committed by Eugene Yokota
parent 95a2219b77
commit 01ce348e0b
3 changed files with 13 additions and 4 deletions

View File

@ -0,0 +1,9 @@
#!/usr/bin/env python3
import sys
if '--version' in sys.argv or '-version' in sys.argv:
print('openjdk version "1.8.0_212"')
else:
for arg in sys.argv[1:]:
print(repr(arg)[1:-1])

View File

@ -0,0 +1 @@
@python "%~dp0%~n0" %*

View File

@ -6,7 +6,6 @@ import sbt.io.IO
import java.io.File
import java.io.PrintWriter
import java.nio.file.Files
import java.nio.file.Paths
object SbtScriptTest extends SimpleTestSuite with PowerAssertions {
lazy val isWindows: Boolean =
@ -15,7 +14,7 @@ object SbtScriptTest extends SimpleTestSuite with PowerAssertions {
if (isWindows) new File("target/universal/stage/bin/sbt.bat")
else new File("target/universal/stage/bin/sbt")
private val javaBinDir = Paths.get(sys.env("JAVA_HOME"), "bin").toFile.getAbsolutePath
private val javaBinDir = new File("integration-test", "bin").getAbsolutePath
private def makeTest(
name: String,
@ -51,7 +50,7 @@ object SbtScriptTest extends SimpleTestSuite with PowerAssertions {
).!!.linesIterator.toList
f(out)
()
} finally {
} finally {
IO.delete(workingDirectory)
}
}
@ -95,7 +94,7 @@ object SbtScriptTest extends SimpleTestSuite with PowerAssertions {
assert(out.contains[String]("-Dsbt.supershell=false"))
}
makeTest("sbt --sbt-version")("compile", "--sbt-version", "1.3.13", "-v") { out: List[String] =>
makeTest("sbt --sbt-version")("--sbt-version", "1.3.13", "-v") { out: List[String] =>
assert(out.contains[String]("-Dsbt.version=1.3.13"))
}