Beispiel #1
0
        public void Exited(string id)
        {
            lock (WaitingForPlatforms)
            {
                if (WaitingForPlatforms.Contains(id))
                {
                    AddTest(TestMeta.FakeTest("Never Received Tests"), id);
                }
            }

            lock (ExpectedTests)
            {
                foreach (var expectedTest in ExpectedTests)
                {
                    var result = expectedTest.Value.FirstOrDefault(it => it.Platform == id);

                    if (result != null && result.Result == null)
                    {
                        AddResult(new Result()
                        {
                            Platform = id,
                            Kind     = ResultKind.Error,
                            Output   = "Runner unexpectedly quit",
                            Test     = result.MissingTest
                        });
                    }
                }
            }

            ReceivedTests(id);
        }
Beispiel #2
0
        public void ReceivedTests(string id)
        {
            lock (WaitingForPlatforms)
            {
                WaitingForPlatforms.Remove(id);

                if (!WaitingForPlatforms.Any() && !Go)
                {
                    foreach (var expectedTest in ExpectedTests.ToDictionary(k => k.Key, v => v.Value))
                    {
                        var remove = !expectedTest.Value.All(pr => TestFilter.Value.ShouldRun(pr.MissingTest));
                        if (remove)
                        {
                            ExpectedTests.Remove(expectedTest.Key);
                        }
                    }

                    PrintResults.PrintStart();
                    Go = true;
                }
            }
        }