[mtouch tests] Improve Sdk tests to list all failing assemblies instead of failing on the first one. (#474)
This commit is contained in:
Родитель
59aae5425f
Коммит
8f685cba8f
|
@ -1,6 +1,7 @@
|
|||
// Copyright 2015 Xamarin Inc. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
@ -34,6 +35,7 @@ namespace Xamarin.Linker {
|
|||
|
||||
void BCL (string path)
|
||||
{
|
||||
var failed_bcl = new List<string> ();
|
||||
foreach (var file in Directory.GetFiles (path, "*.dll")) {
|
||||
var aname = Path.GetFileNameWithoutExtension (file);
|
||||
switch (aname) {
|
||||
|
@ -64,18 +66,21 @@ namespace Xamarin.Linker {
|
|||
case "Xamarin.Analysis.Tasks":
|
||||
// other stuff that is not part of the SDK but shipped in the same 2.1 directory
|
||||
if (path != ClassicPath)
|
||||
Assert.Fail (aname);
|
||||
failed_bcl.Add (aname);
|
||||
break;
|
||||
default:
|
||||
Assert.IsTrue (ProfilePoker.IsWellKnownSdk (aname), aname);
|
||||
if (!ProfilePoker.IsWellKnownSdk (aname))
|
||||
failed_bcl.Add (aname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
CollectionAssert.IsEmpty (failed_bcl, "BCL");
|
||||
}
|
||||
|
||||
void REPL (string path)
|
||||
{
|
||||
var repl = Path.Combine (path, "repl");
|
||||
var failed_repl = new List<string> ();
|
||||
foreach (var file in Directory.GetFiles (repl, "*.dll")) {
|
||||
var aname = Path.GetFileNameWithoutExtension (file);
|
||||
switch (aname) {
|
||||
|
@ -85,22 +90,27 @@ namespace Xamarin.Linker {
|
|||
case "System.Core":
|
||||
case "System.Xml":
|
||||
case "Mono.CSharp":
|
||||
Assert.IsTrue (ProfilePoker.IsWellKnownSdk (aname), aname);
|
||||
if (!ProfilePoker.IsWellKnownSdk (aname))
|
||||
failed_repl.Add (aname);
|
||||
break;
|
||||
default:
|
||||
Assert.Fail (aname);
|
||||
failed_repl.Add (aname);
|
||||
break;
|
||||
}
|
||||
}
|
||||
CollectionAssert.IsEmpty (failed_repl, "Repl");
|
||||
}
|
||||
|
||||
void Facades (string path)
|
||||
{
|
||||
var facades = Path.Combine (path, "Facades");
|
||||
var failed_facades = new List<string> ();
|
||||
foreach (var file in Directory.GetFiles (facades, "*.dll")) {
|
||||
var aname = Path.GetFileNameWithoutExtension (file);
|
||||
Assert.IsTrue (ProfilePoker.IsWellKnownSdk (aname), aname);
|
||||
if (!ProfilePoker.IsWellKnownSdk (aname))
|
||||
failed_facades.Add (aname);
|
||||
}
|
||||
CollectionAssert.IsEmpty (failed_facades, "Facades");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
Загрузка…
Ссылка в новой задаче