X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2FTestDriver.cs;h=97f5520d3f709c70e91c5823c18432435d3f4ac4;hb=cb4dfb5d9803365b73db03e34dc9900301b19a80;hp=7edb0ea825291cd22c11503eface9d631aad84f1;hpb=8ef4e4703172fd32ada3f74b22df5203b4683493;p=mono.git diff --git a/mono/mini/TestDriver.cs b/mono/mini/TestDriver.cs index 7edb0ea8252..97f5520d3f7 100644 --- a/mono/mini/TestDriver.cs +++ b/mono/mini/TestDriver.cs @@ -17,7 +17,7 @@ public class TestDriver { static public int RunTests (Type type, string[] args) { int failed = 0, ran = 0; - int result, expected, elen; + int result, expected; int i, j, iterations; string name; MethodInfo[] methods; @@ -29,9 +29,9 @@ public class TestDriver { iterations = 1; var exclude = new Dictionary (); - List new_args = new List (); + List run_only = new List (); if (args != null && args.Length > 0) { - for (j = 0; j < args.Length; j++) { + for (j = 0; j < args.Length;) { if (args [j] == "--time") { do_timings = true; j ++; @@ -40,11 +40,16 @@ public class TestDriver { j += 2; } else if ((args [j] == "-v") || (args [j] == "--verbose")) { verbose = true; + j += 1; } else if (args [j] == "--exclude") { exclude [args [j + 1]] = args [j + 1]; j += 2; + } else if (args [j] == "--run-only") { + run_only.Add (args [j + 1]); + j += 2; } else { - new_args.Add (args [j]); + Console.WriteLine ("Unknown argument: " + args [j]); + return 1; } } } @@ -55,10 +60,10 @@ public class TestDriver { name = methods [i].Name; if (!name.StartsWith ("test_", StringComparison.Ordinal)) continue; - if (new_args.Count > 0) { + if (run_only.Count > 0) { bool found = false; - for (j = 0; j < new_args.Count; j++) { - if (name.EndsWith (new_args [j])) { + for (j = 0; j < run_only.Count; j++) { + if (name.EndsWith (run_only [j])) { found = true; break; }