Skip to content

Commit c62a1a3

Browse files
committed
fail BashScriptsTests if dist/target/pack/bin/scala* missing
1 parent 6011847 commit c62a1a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/test/dotty/tools/scripting/BashScriptsTests.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ class BashScriptsTests:
3939
val scalacPath = "dist/target/pack/bin/scalac" // which("scalac")
4040
val scalaPath = "dist/target/pack/bin/scala" // which("scala")
4141

42+
def isFile(path: String): Boolean =
43+
Files.isRegularFile(Paths.get(path))
44+
4245
/* verify `dist/bin/scalac` */
4346
@Test def verifyScalacArgs =
47+
assert(isFile(scalacPath))
4448
printf("scalacPath[%s]\n",scalacPath)
4549
val commandline = (Seq(scalacPath, "-script", showArgsScript) ++ testScriptArgs).mkString(" ")
4650
if bashPath.toFile.exists then
@@ -60,6 +64,7 @@ class BashScriptsTests:
6064

6165
/* verify `dist/bin/scala` */
6266
@Test def verifyScalaArgs =
67+
assert(isFile(scalaPath))
6368
val commandline = (Seq(scalaPath, showArgsScript) ++ testScriptArgs).mkString(" ")
6469
if bashPath.toFile.exists then
6570
var cmd = Array(bashExe, "-c", commandline)

0 commit comments

Comments
 (0)