Skip to content

Commit

Permalink
RunTests.m: Allow selection of test suite file to run
Browse files Browse the repository at this point in the history
Cannot run individual tests yet
  • Loading branch information
ianhinder committed Sep 5, 2013
1 parent 8aaf3eb commit 449186b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Tests/RunTests.m
@@ -1,4 +1,4 @@
#!/usr/bin/env math -script
#!/usr/bin/env MathematicaScript -script

SetOptions[ $Output, FormatType -> OutputForm ];

Expand All @@ -18,12 +18,19 @@
Needs["KrancThorn`"];
(* (\* Needs["Profile`"]; *\) *)

SetDebugLevel[DebugQuiet];
(* SetDebugLevel[DebugQuiet]; *)

tests = {
alltests = {
"Kranc",
"McLachlan"
};

args = Drop[$ScriptCommandLine, 1];

If[Length[args] > 0,
If[StringMatchQ[args[[1]], "*.mt"],
tests = {StringReplace[args[[1]], ".mt" -> ""]}],
tests = alltests];

(Print["\n"]; TestRun[#<>".mt", Loggers -> {VerbosePrintLogger[]}, TestRunTitle -> #]) & /@ tests;
Print[];

0 comments on commit 449186b

Please sign in to comment.