summaryrefslogtreecommitdiff
path: root/src/partest
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2008-11-01 20:01:29 +0000
committermichelou <michelou@epfl.ch>2008-11-01 20:01:29 +0000
commitc50dd4e212fff79020f0100d1a81ab64b599251f (patch)
tree70a9254b69b4f1175b378b7e969d0188fd701759 /src/partest
parent6599832787acde26f4b621c6e19ffe2bbbd180a1 (diff)
downloadscala-c50dd4e212fff79020f0100d1a81ab64b599251f.tar.gz
scala-c50dd4e212fff79020f0100d1a81ab64b599251f.tar.bz2
scala-c50dd4e212fff79020f0100d1a81ab64b599251f.zip
fixed "script" tests on Windows (Cygwin+DOS)
Diffstat (limited to 'src/partest')
-rw-r--r--src/partest/scala/tools/partest/nest/Worker.scala10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/partest/scala/tools/partest/nest/Worker.scala b/src/partest/scala/tools/partest/nest/Worker.scala
index d73a11dff7..57065df99e 100644
--- a/src/partest/scala/tools/partest/nest/Worker.scala
+++ b/src/partest/scala/tools/partest/nest/Worker.scala
@@ -774,6 +774,7 @@ class Worker(val fileManager: FileManager) extends Actor {
}
}
case "script" => {
+ val osName = System.getProperty("os.name", "")
for (file <- files) {
// when option "--failed" is provided
// execute test only if log file is present
@@ -800,7 +801,14 @@ class Worker(val fileManager: FileManager) extends Actor {
} else ""
try {
- val proc = Runtime.getRuntime.exec(file.getAbsolutePath+argString)
+ val cmdString =
+ if (osName startsWith "Windows") {
+ val batchFile = new File(file.getParentFile, fileBase+".bat")
+ NestUI.verbose("batchFile: "+batchFile)
+ batchFile.getAbsolutePath
+ }
+ else file.getAbsolutePath
+ val proc = Runtime.getRuntime.exec(cmdString+argString)
val in = proc.getInputStream
val err = proc.getErrorStream
val writer = new PrintWriter(new FileWriter(logFile), true)