[tests] print seed
authorBernhard Urban <bernhard.urban@xamarin.com>
Tue, 25 Apr 2017 22:13:38 +0000 (00:13 +0200)
committerBernhard Urban <bernhard.urban@xamarin.com>
Fri, 28 Apr 2017 18:52:06 +0000 (20:52 +0200)
I've seen this test failing on CI with --interpreter, can't reproduce it
though.  Next time it would be nice to see the used seed.

mono/tests/bug-10127.cs

index 4662ff6fa8054d9a7b634f068a86550f53df88de..389616e4088c0929a40d3abbf37bb2515f18094c 100644 (file)
@@ -33,7 +33,7 @@ namespace WeakReferenceTest
        }
 
        public class Tester {
-               static readonly int seed = unchecked(DateTime.Now.Ticks.GetHashCode());
+               public static readonly int seed = unchecked(DateTime.Now.Ticks.GetHashCode());
 
                Random rand = new Random(seed);
 
@@ -88,6 +88,7 @@ namespace WeakReferenceTest
                public static void Main (string[] args)
                {
                        Console.WriteLine("Starting cache testers");
+                       Console.WriteLine("Thread seed: " + Tester.seed);
                        List<Tester> testers = new List<Tester>();
                        for (int count = 0; count < 10; count++) {
                                testers.Add(new Tester());