Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <m.j.hutchinson@gmail.com>2014-01-08 02:09:51 +0400
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2014-01-08 03:39:34 +0400
commit84b473c0862140a0a08c8b67243cd25289d7beb0 (patch)
tree446060896e40b0a6814a45b63fb22dde65fc0c44 /mcs/class/Microsoft.Build.Engine
parent15fedf3b085f5f7c11c1484506e95f08cc312382 (diff)
[xbuild] Fix the xbuild 12 tests
Diffstat (limited to 'mcs/class/Microsoft.Build.Engine')
-rw-r--r--mcs/class/Microsoft.Build.Engine/Makefile27
-rw-r--r--mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs44
-rw-r--r--mcs/class/Microsoft.Build.Engine/Test/test-config-file-net-3.515
-rw-r--r--mcs/class/Microsoft.Build.Engine/Test/test-config-file-net-4.015
4 files changed, 41 insertions, 60 deletions
diff --git a/mcs/class/Microsoft.Build.Engine/Makefile b/mcs/class/Microsoft.Build.Engine/Makefile
index 2bf7d9b8c66..04f9e66dac5 100644
--- a/mcs/class/Microsoft.Build.Engine/Makefile
+++ b/mcs/class/Microsoft.Build.Engine/Makefile
@@ -23,34 +23,17 @@ TEST_MCS_FLAGS = \
EXTRA_DISTFILES = \
Test/resources/TestTasks.cs \
Test/resources/*.*proj \
- Test/resources/*.csproj \
- Test/test-config-file*
+ Test/resources/*.csproj
Test/resources/TestTasks.dll: Test/resources/TestTasks.cs
$(CSCOMPILE) Test/resources/TestTasks.cs /r:$(XBUILD_FRAMEWORK) /r:$(XBUILD_UTILITIES) /target:library
-clean-local: clean-test-tasks
-
-clean-test-tasks:
+clean-test-resources:
rm -f Test/resources/TestTasks.dll
-test-local: copy-config
-
-ifeq (net_4_0, $(PROFILE))
-copy-config:
- cp Test/test-config-file-net-4.0 $(test_lib).config
-else
-ifeq (net_3_5, $(PROFILE))
-copy-config:
- cp Test/test-config-file-net-3.5 $(test_lib).config
-else
-copy-config:
-endif
-endif
-
-export TESTING_MONO=a
-include $(XBUILD_DIR)/xbuild_targets.make
-
test-local: Test/resources/TestTasks.dll
+clean-local: clean-test-resources
+
+include $(XBUILD_DIR)/xbuild_test.make
include ../../build/library.make
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs
index 31a160850a1..8db3be70a9d 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/Consts.cs
@@ -38,16 +38,42 @@ public static class Consts {
public static string BinPath {
get {
- if (RunningOnMono ())
- return "../../tools/xbuild/xbuild";
- else
+ if (RunningOnMono ()) {
+#if XBUILD_12
+ string profile = "xbuild_12";
+#elif NET_4_5
+ string profile = "net_4_5";
+#elif NET_4_0
+ string profile = "net_4_0";
+#elif NET_3_5
+ string profile = "net_3_5";
+#else
+ string profile = "net_2_0";
+#endif
+ var corlib = typeof (object).Assembly.Location;
+ var lib = Path.GetDirectoryName (Path.GetDirectoryName (corlib));
+ return Path.Combine (lib, profile);
+ } else {
+#if XBUILD_12
+ return ToolLocationHelper.GetPathToBuildTools ("12.0");
+#elif NET_4_5
+ return ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version45);
+#elif NET_4_0
+ return ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version40);
+#elif NET_3_5
+ return ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version35);
+#else
return ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version20);
+#endif
+ }
}
}
public static string ToolsVersionString {
get {
-#if NET_4_0
+#if XBUILD_12
+ return " ToolsVersion='12.0'";
+#elif NET_4_0
return " ToolsVersion='4.0'";
#elif NET_3_5
return " ToolsVersion='3.5'";
@@ -59,12 +85,14 @@ public static class Consts {
public static string GetTasksAsmPath ()
{
-#if NET_4_0
- return Path.Combine (ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version40), "Microsoft.Build.Tasks.v4.0.dll");
+#if XBUILD_12
+ return Path.Combine (BinPath, "Microsoft.Build.Tasks.v12.0.dll");
+#elif NET_4_0
+ return Path.Combine (BinPath, "Microsoft.Build.Tasks.v4.0.dll");
#elif NET_3_5
- return Path.Combine (ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version35), "Microsoft.Build.Tasks.v3.5.dll");
+ return Path.Combine (BinPath, "Microsoft.Build.Tasks.v3.5.dll");
#else
- return Path.Combine (ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version20), "Microsoft.Build.Tasks.dll");
+ return Path.Combine (BinPath, "Microsoft.Build.Tasks.dll");
#endif
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/test-config-file-net-3.5 b/mcs/class/Microsoft.Build.Engine/Test/test-config-file-net-3.5
deleted file mode 100644
index 7756bca8df1..00000000000
--- a/mcs/class/Microsoft.Build.Engine/Test/test-config-file-net-3.5
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version ="1.0"?>
-<configuration>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
- <bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.5.0.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Build.Engine" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
- <bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.5.0.0"/>
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
-</configuration>
diff --git a/mcs/class/Microsoft.Build.Engine/Test/test-config-file-net-4.0 b/mcs/class/Microsoft.Build.Engine/Test/test-config-file-net-4.0
deleted file mode 100644
index 3c78f3b4ec8..00000000000
--- a/mcs/class/Microsoft.Build.Engine/Test/test-config-file-net-4.0
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version ="1.0"?>
-<configuration>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
- <bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="4.0.0.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Build.Engine" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
- <bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="4.0.0.0"/>
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
-</configuration>