[msbuild][tests] Adjust the BindingProject test according to the relocation of bindings-test.csproj.
Also remove the BindingProject.FrameworkTest, it's 100% identical to BindingProject.BuildTest, and thus redundant.
This commit is contained in:
Родитель
12b30b709f
Коммит
92a9aacbd3
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using NUnit.Framework;
|
||||
using NUnit.Framework;
|
||||
using System.IO;
|
||||
using Xamarin.Tests;
|
||||
|
||||
|
@ -18,7 +17,7 @@ namespace Xamarin.iOS.Tasks
|
|||
[Test]
|
||||
public void BuildTest ()
|
||||
{
|
||||
var mtouchPaths = SetupProjectPaths ("bindings-test", "bindings-test", Path.Combine (Configuration.RootPath, "tests"), false, Platform, "Any CPU/Debug-unified");
|
||||
var mtouchPaths = SetupProjectPaths ("bindings-test", projectPath: Path.Combine (Configuration.RootPath, "tests", "bindings-test", "iOS"), includePlatform: false, config: "Any CPU/Debug-unified");
|
||||
|
||||
var proj = SetupProject (Engine, mtouchPaths ["project_csprojpath"]);
|
||||
|
||||
|
@ -33,25 +32,6 @@ namespace Xamarin.iOS.Tasks
|
|||
RunTarget (proj, "Clean");
|
||||
Assert.IsFalse (File.Exists (dllPath), "{1}: binding dll exists after cleanup: {0} ", dllPath, Platform);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void FrameworkTest ()
|
||||
{
|
||||
var mtouchPaths = SetupProjectPaths ("bindings-test", "bindings-test", Path.Combine (Configuration.RootPath, "tests"), false, Platform, "Any CPU/Debug-unified");
|
||||
|
||||
var proj = SetupProject (Engine, mtouchPaths ["project_csprojpath"]);
|
||||
AppBundlePath = mtouchPaths.AppBundlePath;
|
||||
var dllPath = Path.Combine(mtouchPaths.ProjectBinPath, "bindings-test.dll");
|
||||
|
||||
Engine.ProjectCollection.SetGlobalProperty ("Platform", Platform);
|
||||
|
||||
RunTarget (proj, "Build", 0);
|
||||
Assert.IsTrue (File.Exists (dllPath), "{1} binding dll does not exist: {0} ", dllPath, Platform);
|
||||
|
||||
RunTarget (proj, "Clean");
|
||||
Assert.IsFalse (File.Exists (dllPath), "{1}: binding dll exists after cleanup: {0} ", dllPath, Platform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -148,14 +148,15 @@ namespace Xamarin.iOS.Tasks
|
|||
get; set;
|
||||
}
|
||||
|
||||
public ProjectPaths SetupProjectPaths (string projectName, string csprojName, string baseDir = "../", bool includePlatform = true, string platform = "iPhoneSimulator", string config = "Debug")
|
||||
public ProjectPaths SetupProjectPaths (string projectName, string csprojName, string baseDir = "../", bool includePlatform = true, string platform = "iPhoneSimulator", string config = "Debug", string projectPath = null)
|
||||
{
|
||||
var testsBase = GetTestDirectory ();
|
||||
string projectPath;
|
||||
if (Path.IsPathRooted (baseDir)) {
|
||||
projectPath = Path.Combine (baseDir, projectName);
|
||||
} else {
|
||||
projectPath = Path.Combine (testsBase, "Xamarin.iOS.Tasks.Tests", baseDir, projectName);
|
||||
if (projectPath == null) {
|
||||
if (Path.IsPathRooted (baseDir)) {
|
||||
projectPath = Path.Combine (baseDir, projectName);
|
||||
} else {
|
||||
projectPath = Path.Combine (testsBase, "Xamarin.iOS.Tasks.Tests", baseDir, projectName);
|
||||
}
|
||||
}
|
||||
|
||||
var binPath = includePlatform ? Path.Combine (projectPath, "bin", platform, config) : Path.Combine (projectPath, "bin", config);
|
||||
|
@ -170,9 +171,9 @@ namespace Xamarin.iOS.Tasks
|
|||
};
|
||||
}
|
||||
|
||||
public ProjectPaths SetupProjectPaths (string projectName, string baseDir = "../", bool includePlatform = true, string platform = "iPhoneSimulator", string config = "Debug")
|
||||
public ProjectPaths SetupProjectPaths (string projectName, string baseDir = "../", bool includePlatform = true, string platform = "iPhoneSimulator", string config = "Debug", string projectPath = null)
|
||||
{
|
||||
return SetupProjectPaths (projectName, projectName, baseDir, includePlatform, platform, config);
|
||||
return SetupProjectPaths (projectName, projectName, baseDir, includePlatform, platform, config, projectPath);
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
|
|
Загрузка…
Ссылка в новой задаче