Skip to content

Commit 171926a

Browse files
authored
Merge pull request #319 from scala/backport-lts-3.3-22796
Backport "Add support for running the `test` sub-command with the bisect script" to 3.3 LTS
2 parents 54aa220 + 9c0b91d commit 171926a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

project/scripts/bisect.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ val usageMessage = """
2020
|The <validation-command> should be one of:
2121
|* compile <arg1> <arg2> ...
2222
|* run <arg1> <arg2> ...
23+
|* test <arg1> <arg2> ...
2324
|* <custom-validation-script-path>
2425
|
2526
|The arguments for 'compile' and 'run' should be paths to the source file(s) and optionally additional options passed directly to scala-cli.
@@ -100,20 +101,24 @@ object ScriptOptions:
100101
enum ValidationCommand:
101102
case Compile(args: Seq[String])
102103
case Run(args: Seq[String])
104+
case Test(args: Seq[String])
103105
case CustomValidationScript(scriptFile: File)
104106

105107
def validationScript: File = this match
106108
case Compile(args) =>
107109
ValidationScript.tmpScalaCliScript(command = "compile", args)
108110
case Run(args) =>
109111
ValidationScript.tmpScalaCliScript(command = "run", args)
112+
case Test(args) =>
113+
ValidationScript.tmpScalaCliScript(command = "test", args)
110114
case CustomValidationScript(scriptFile) =>
111115
ValidationScript.copiedFrom(scriptFile)
112116

113117
object ValidationCommand:
114118
def fromArgs(args: Seq[String]) = args match
115119
case Seq("compile", commandArgs*) => Compile(commandArgs)
116120
case Seq("run", commandArgs*) => Run(commandArgs)
121+
case Seq("test", commandArgs*) => Test(commandArgs)
117122
case Seq(path) => CustomValidationScript(new File(path))
118123

119124

0 commit comments

Comments
 (0)