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
path: root/mcs/class
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
parent15fedf3b085f5f7c11c1484506e95f08cc312382 (diff)
[xbuild] Fix the xbuild 12 tests
Diffstat (limited to 'mcs/class')
-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
-rw-r--r--mcs/class/Microsoft.Build.Framework/Makefile8
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Makefile32
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Makefile4
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs3
-rw-r--r--mcs/class/Microsoft.Build/Makefile3
-rw-r--r--mcs/class/Mono.XBuild.Tasks/Makefile3
10 files changed, 54 insertions, 100 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>
diff --git a/mcs/class/Microsoft.Build.Framework/Makefile b/mcs/class/Microsoft.Build.Framework/Makefile
index b7b6a37ebfc..73f43fb74c7 100644
--- a/mcs/class/Microsoft.Build.Framework/Makefile
+++ b/mcs/class/Microsoft.Build.Framework/Makefile
@@ -11,10 +11,8 @@ LIB_MCS_FLAGS = \
/r:$(corlib) \
/r:System.dll
-include ../../build/library.make
-
-export TESTING_MONO=a
-include $(XBUILD_DIR)/xbuild_targets.make
-
EXTRA_DISTFILES = \
Mono.XBuild.Framework/AssemblyLoadInfo.cs
+
+include ../../build/library.make
+include $(XBUILD_DIR)/xbuild_test.make
diff --git a/mcs/class/Microsoft.Build.Tasks/Makefile b/mcs/class/Microsoft.Build.Tasks/Makefile
index c3d0cb19f36..d8e93372f45 100644
--- a/mcs/class/Microsoft.Build.Tasks/Makefile
+++ b/mcs/class/Microsoft.Build.Tasks/Makefile
@@ -7,9 +7,6 @@ include $(XBUILD_DIR)/xbuild.make
LIBRARY = Microsoft.Build.Tasks.dll
-# Some tests are explicitly testing Microsoft.Build.Tasks.v3.5.dll
-TEST_MONO_PATH = $(topdir)/class/lib/net_3_5$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/net_2_0
-
LIBRARY_NAME = Microsoft.Build.Tasks$(NAME_SUFFIX).dll
LIB_MCS_FLAGS = \
@@ -37,36 +34,15 @@ EXTRA_DISTFILES = \
Test/resources/junk.txt \
Test/test-config-file*
-test-local: Test/resources/test.dll
-
Test/resources/test.dll: Test/resources/test.cs
$(CSCOMPILE) -target:library Test/resources/test.cs
-clean-local: clean-test-dll
-
-clean-test-dll:
+clean-test-resources:
rm -f Test/resources/test.dll
-test-local: copy-config
-
-ifeq (net_4_5, $(PROFILE))
-copy-config:
- cp Test/test-config-file-net-4.0 $(test_lib).config
-else
-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
-endif
+test-local: Test/resources/test.dll
-export TESTING_MONO=a
-include $(XBUILD_DIR)/xbuild_targets.make
+clean-local: clean-test-resources
+include $(XBUILD_DIR)/xbuild_test.make
include ../../build/library.make
diff --git a/mcs/class/Microsoft.Build.Utilities/Makefile b/mcs/class/Microsoft.Build.Utilities/Makefile
index 8e8cdaddd6d..79888a2a3b4 100644
--- a/mcs/class/Microsoft.Build.Utilities/Makefile
+++ b/mcs/class/Microsoft.Build.Utilities/Makefile
@@ -15,7 +15,5 @@ LIB_MCS_FLAGS = \
TEST_MCS_FLAGS = /r:$(XBUILD_FRAMEWORK) -r:System.dll -r:System.Core.dll
-export TESTING_MONO=a
-include $(XBUILD_DIR)/xbuild_targets.make
-
+include $(XBUILD_DIR)/xbuild_test.make
include ../../build/library.make
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
index 35226c1a8b1..9a2ed2c6f96 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
@@ -161,6 +161,9 @@ namespace Microsoft.Build.Utilities
if (toolsVersion != "12.0")
return null;
+ if (Environment.GetEnvironmentVariable ("TESTING_MONO") != null)
+ return Path.Combine (lib_mono_dir, "xbuild_12");
+
if (runningOnDotNet) {
//see http://msdn.microsoft.com/en-us/library/vstudio/bb397428(v=vs.120).aspx
var programFiles = Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86);
diff --git a/mcs/class/Microsoft.Build/Makefile b/mcs/class/Microsoft.Build/Makefile
index 8f7fc060c94..931b9fc7e57 100644
--- a/mcs/class/Microsoft.Build/Makefile
+++ b/mcs/class/Microsoft.Build/Makefile
@@ -34,6 +34,5 @@ BUILT_SOURCES = $(EXPR_PARSER).cs
include ../../build/library.make
-export TESTING_MONO=a
XBUILD_FRAMEWORK_FOLDERS_PATH=xbuild-testing
-include $(XBUILD_DIR)/xbuild_targets.make
+include $(XBUILD_DIR)/xbuild_test.make
diff --git a/mcs/class/Mono.XBuild.Tasks/Makefile b/mcs/class/Mono.XBuild.Tasks/Makefile
index 23aabb41c42..7135c45e3c7 100644
--- a/mcs/class/Mono.XBuild.Tasks/Makefile
+++ b/mcs/class/Mono.XBuild.Tasks/Makefile
@@ -12,7 +12,6 @@ LIB_MCS_FLAGS = \
/r:System.dll \
/r:System.Xml.dll
-export TESTING_MONO=a
-include $(XBUILD_DIR)/xbuild_targets.make
+include $(XBUILD_DIR)/xbuild_test.make
include ../../build/library.make