diff options
author | Philipp Haller <hallerp@gmail.com> | 2008-02-26 11:31:31 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2008-02-26 11:31:31 +0000 |
commit | fe0b578001f1f9a47c6e8d375382194474c75736 (patch) | |
tree | 226c9d1909d45032046c1bc55aa4de56454754ce | |
parent | 54df3c451cb58d77a6dfe5e4114b51b8eedc5c57 (diff) | |
download | scala-fe0b578001f1f9a47c6e8d375382194474c75736.tar.gz scala-fe0b578001f1f9a47c6e8d375382194474c75736.tar.bz2 scala-fe0b578001f1f9a47c6e8d375382194474c75736.zip |
Now runs on Windows.
-rw-r--r-- | src/partest/scala/tools/partest/nest/FileManager.scala | 16 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/NestRunner.scala | 3 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/partest/scala/tools/partest/nest/FileManager.scala b/src/partest/scala/tools/partest/nest/FileManager.scala index 0d45f8ae1f..c3b7aa75a1 100644 --- a/src/partest/scala/tools/partest/nest/FileManager.scala +++ b/src/partest/scala/tools/partest/nest/FileManager.scala @@ -69,7 +69,7 @@ elif [ -d "$PREFIX/bin" ]; then */ def findLatest() { def prefixFile(relPath: String) = - new File(PREFIX, relPath) + (new File(PREFIX, relPath)).getCanonicalFile NestUI.verbose("PREFIX: "+PREFIX) val dists = new File(PREFIX, "dists") @@ -102,8 +102,18 @@ elif [ -d "$PREFIX/bin" ]; then LATEST_LIB = latestLibFile.getAbsolutePath LATEST_COMP = latestCompFile.getAbsolutePath LATEST_PARTEST = latestPartestFile.getAbsolutePath - SCALA = (new File(latestFile, "scala")).getAbsolutePath - SCALAC_CMD = (new File(latestFile, "scalac")).getAbsolutePath + + // detect whether we are running on Windows + val osName = System.getProperty("os.name") + NestUI.verbose("OS: "+osName) + + val scalaCommand = if (osName startsWith "Windows") + "scala.bat" else "scala" + val scalacCommand = if (osName startsWith "Windows") + "scalac.bat" else "scalac" + + SCALA = (new File(latestFile, scalaCommand)).getAbsolutePath + SCALAC_CMD = (new File(latestFile, scalacCommand)).getAbsolutePath } var BIN_DIR: String = "" diff --git a/src/partest/scala/tools/partest/nest/NestRunner.scala b/src/partest/scala/tools/partest/nest/NestRunner.scala index 5598db3a15..1c6bd52649 100644 --- a/src/partest/scala/tools/partest/nest/NestRunner.scala +++ b/src/partest/scala/tools/partest/nest/NestRunner.scala @@ -37,8 +37,6 @@ object NestRunner { Integer.parseInt(System.getProperty("scalatest.errors", "0")) def main(args: Array[String]) { - NestUI.initialize(NestUI.MANY) - if (args.length == 0) NestUI.usage() else { @@ -57,6 +55,7 @@ object NestRunner { case "--show-log" => showLog = true case "--failed" => failed = true case "--version" => //todo: printVersion + case "--ansi" => NestUI.initialize(NestUI.MANY) case _ => if (arg endsWith ".scala") { val file = new File(arg) |