diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/partest/README | 35 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/ConsoleRunner.scala | 13 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/NestUI.scala | 7 |
3 files changed, 48 insertions, 7 deletions
diff --git a/src/partest/README b/src/partest/README new file mode 100644 index 0000000000..906439793a --- /dev/null +++ b/src/partest/README @@ -0,0 +1,35 @@ +How partest choses the compiler / library: + + * ''-Dscalatest.build=build/four-pack'' -> will search for libraries in + ''lib'' directory of given path + * ''--pack'' -> will set ''scalatest.build=build/pack'', and run all tests. + add ''--[kind]'' to run a selected set of tests. + * ''--[four]'' -> will set ''scalatest.build=build-four-pack'' and + ''scalatest.scalac_opts=-target:jvm-1.4'', and run all tests. + add ''--kind'' to run a selected set of tests. + * auto detection: + - scalatest.build property -> ''bin'' / ''lib'' directories + - distribution (''dists/latest'') + - supersabbus pack (''build/pack'') + - sabbus quick (''build/quick'') + - installed dist (test files in ''misc/scala-test/files'') + +How partest choses test files: the test files must be accessible from +the directory on which partest is run. So the test files must be either +at: + * ./test/files + * ./files (cwd is "test") + * ./misc/scala-test/files (installed scala distribution) + +Other arguments: + * --pos next files test a compilation success + * --neg next files test a compilation failure + * --run next files test the interpreter and all backends + * --jvm next files test the JVM backend + * --jvm5 next files test the JVM backend + * --res next files test the resident compiler + * --shootout next files are shootout tests + * --script next files test the script runner + * ''-Dscalatest.scalac_opts=-target:jvm-1.4'' -> add compiler options + * ''--verbose'' -> print verbose messages + * ''-Dpartest.debug=true'' -> print debug messages diff --git a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala index 67f698ab82..0be780e5c8 100644 --- a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala +++ b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala @@ -9,7 +9,6 @@ package scala.tools.partest.nest import java.io.{File, PrintStream, FileOutputStream, BufferedReader, InputStreamReader, StringWriter, PrintWriter} -import java.util.StringTokenizer import scala.actors.Actor._ @@ -52,19 +51,21 @@ class ConsoleRunner extends DirectRunner { } def main(argstr: String) { - // tokenize args - var args = List.fromArray(argstr.split("\\s")) + // tokenize args. filter: "".split("\\s") yields Array("") + var args = List.fromArray(argstr.split("\\s")).remove(_ == "") if (args.length == 0) NestUI.usage() else { // create a file manager fileManager = - if (args contains "--pack") + if (args contains "--pack") { + args = args.remove(_ == "--pack") // will create a result file '--pack' otherwise new ConsoleFileManager("build/pack") - else if (args contains "--four") + } else if (args contains "--four") { + args = args.remove(_ == "--four") new ConsoleFileManager("build/four-pack", "-target:jvm-1.4") - else // auto detection + } else // auto detection, see ConsoleFileManager.findLatest new ConsoleFileManager if (!args.exists(denotesTestSet(_)) && !args.exists(_.endsWith(".scala"))) runAll = true diff --git a/src/partest/scala/tools/partest/nest/NestUI.scala b/src/partest/scala/tools/partest/nest/NestUI.scala index e61e5884b4..af57ca18ca 100644 --- a/src/partest/scala/tools/partest/nest/NestUI.scala +++ b/src/partest/scala/tools/partest/nest/NestUI.scala @@ -63,7 +63,9 @@ object NestUI { def usage() { println("Usage: NestRunner [<options>] [<testfile> ..] [<resfile>]") - println("version Mar13") + println(" <testfile>: list of files ending in '.scala'") + println(" <resfile>: a file not ending in '.scala'") + println(" <options>:") println(" --all run all tests") println(" --pos next files test a compilation success") println(" --neg next files test a compilation failure") @@ -73,9 +75,12 @@ object NestUI { println(" --res next files test the resident compiler") println(" --shootout next files are shootout tests") println(" --script next files test the script runner") + println(" --pack pick compiler / library in build/pack, and run all tests") + println(" --four pick compiler / library in build/four-pack, and run all tests") println(" --verbose display progress information") //println(" --version display version information") println + println("version Mar13") println("Send bugs to <scala@listes.epfl.ch>") exit(1) } |