You've already forked linux-packaging-mono
Imported Upstream version 5.20.0.180
Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
parent
0e2d47d1c8
commit
0510252385
@@ -13,7 +13,23 @@ LIB_REFS = $(PARENT_PROFILE)System $(PARENT_PROFILE)System.Core $(PARENT_PROFILE
|
||||
$(XBUILD_UTILITIES) $(XBUILD_FRAMEWORK) $(XBUILD_ENGINE) $(XBUILD_TASKS)
|
||||
KEYFILE = ../msfinal.pub
|
||||
|
||||
TEST_MCS_FLAGS =
|
||||
TEST_RESOURCE_FILES = \
|
||||
Test/resources/test.cs \
|
||||
Test/resources/test.dll \
|
||||
Test/resources/Sample.cs \
|
||||
Test/resources/Sample.vb \
|
||||
Test/resources/junk.txt \
|
||||
Test/resources/binary/FancyStuff.dll \
|
||||
Test/resources/binary/FancyStuff.dll.mdb \
|
||||
Test/resources/binary/SimpleWrite.dll \
|
||||
Test/resources/binary/SimpleWrite.dll.mdb \
|
||||
Test/resources/binary/Testing.dll \
|
||||
Test/resources/binary/Testing.dll.mdb \
|
||||
Test/resources/binary/XbuildReferenceBugTest.exe \
|
||||
Test/resources/binary/XbuildReferenceBugTest.exe.mdb \
|
||||
Test/resources/binary/XbuildReferenceBugTest2.exe
|
||||
|
||||
TEST_MCS_FLAGS = $(foreach r, $(TEST_RESOURCE_FILES), -resource:$(r),$(r))
|
||||
TEST_LIB_REFS = $(PARENT_PROFILE)System.Xml $(XBUILD_ENGINE) $(XBUILD_FRAMEWORK) $(XBUILD_TASKS) $(XBUILD_UTILITIES) $(PARENT_PROFILE)System.Core
|
||||
|
||||
TEST_NUNITLITE_APP_CONFIG_RUNTIME=Test/test-config-file-$(PROFILE)
|
||||
@@ -22,11 +38,7 @@ ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
|
||||
TEST_LIB_REFS += Microsoft.Build
|
||||
endif
|
||||
|
||||
EXTRA_DISTFILES = \
|
||||
Test/resources/test.cs \
|
||||
Test/resources/Sample.cs \
|
||||
Test/resources/Sample.vb \
|
||||
Test/resources/junk.txt
|
||||
EXTRA_DISTFILES = $(filter-out Test/resources/test.dll, $(TEST_RESOURCE_FILES))
|
||||
|
||||
Test/resources/test.dll: Test/resources/test.cs
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -target:library /out:$@ $<
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
../../test-helpers/TestResourceHelper.cs
|
||||
Microsoft.Build.Tasks/ALTest.cs
|
||||
Microsoft.Build.Tasks/AssignCultureTest.cs
|
||||
Microsoft.Build.Tasks/AssignProjectConfigurationTest.cs
|
||||
|
||||
@@ -6,6 +6,8 @@ using System.Text;
|
||||
using NUnit.Framework;
|
||||
using Microsoft.Build.BuildEngine;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.Tasks
|
||||
{
|
||||
[TestFixture]
|
||||
@@ -17,9 +19,8 @@ namespace MonoTests.Microsoft.Build.Tasks
|
||||
|
||||
public CreateCSharpManifestResourceNameTest ()
|
||||
{
|
||||
string sample_cs_path = Path.Combine ("Test", Path.Combine ("resources", "Sample.cs"));
|
||||
string junk_file = Path.Combine ("Test", Path.Combine ("resources", "junk.txt"));
|
||||
string curdir = Path.GetDirectoryName (Environment.CurrentDirectory);
|
||||
string sample_cs_path = TestResourceHelper.GetFullPathOfResource ("Test/resources/Sample.cs");
|
||||
string junk_file = TestResourceHelper.GetFullPathOfResource ("Test/resources/junk.txt");
|
||||
|
||||
/* {Include, LogicalName, DependentUpon, TargetPath} */
|
||||
resx_no_culture_files = new string [,] {
|
||||
@@ -31,9 +32,9 @@ namespace MonoTests.Microsoft.Build.Tasks
|
||||
// can't find a C# class in the .vb file
|
||||
{ "foo with space.resx", "RandomName", junk_file, "bar with space.resx" },
|
||||
|
||||
{ "Test/resources/foo with space.resx", null, "Sample.cs", null },
|
||||
{ "Test/resources/foo with space.resx", "RandomName", "Sample.cs", null },
|
||||
{ "Test/resources/foo with space.resx", "RandomName", "Sample.cs", "bar with space.resx"},
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.resx"), null, "Sample.cs", null },
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.resx"), "RandomName", "Sample.cs", null },
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.resx"), "RandomName", "Sample.cs", "bar with space.resx"},
|
||||
|
||||
// W/o dependent file
|
||||
{ "foo with space.resx", null, null, null },
|
||||
@@ -52,8 +53,8 @@ namespace MonoTests.Microsoft.Build.Tasks
|
||||
// can't find a C# class in the .vb file
|
||||
{ "foo with space.de.resx", "RandomName", junk_file, "bar with space.fr.resx" },
|
||||
|
||||
{ "Test/resources/foo with space.de.resx", null, "Sample.cs", null },
|
||||
{ "Test/resources/foo with space.de.resx", "RandomName", "Sample.cs", null},
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.de.resx"), null, "Sample.cs", null },
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.de.resx"), "RandomName", "Sample.cs", null},
|
||||
|
||||
// W/o dependent file
|
||||
{ "foo with space.de.resx", null, null, null },
|
||||
|
||||
@@ -7,6 +7,8 @@ using System.Text;
|
||||
using NUnit.Framework;
|
||||
using Microsoft.Build.BuildEngine;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.Tasks
|
||||
{
|
||||
[TestFixture]
|
||||
@@ -17,9 +19,8 @@ namespace MonoTests.Microsoft.Build.Tasks
|
||||
string [,] non_resx_no_culture_files, non_resx_with_culture_files;
|
||||
public CreateVisualBasicManifestResourceNameTest ()
|
||||
{
|
||||
string junk_file = Path.Combine ("Test", Path.Combine ("resources", "junk.txt"));
|
||||
string sample_vb_path = Path.Combine ("Test", Path.Combine ("resources", "Sample.vb"));
|
||||
string curdir = Path.GetDirectoryName (Environment.CurrentDirectory);
|
||||
string junk_file = TestResourceHelper.GetFullPathOfResource ("Test/resources/junk.txt");
|
||||
string sample_vb_path = TestResourceHelper.GetFullPathOfResource ("Test/resources/Sample.vb");
|
||||
|
||||
/* {Include, LogicalName, DependentUpon, TargetPath} */
|
||||
resx_no_culture_files = new string [,] {
|
||||
@@ -31,9 +32,9 @@ namespace MonoTests.Microsoft.Build.Tasks
|
||||
// can't find a C# class in the .vb file
|
||||
{ "foo with space.resx", "RandomName", junk_file, "bar with space.resx" },
|
||||
|
||||
{ "Test/resources/foo with space.resx", null, "Sample.vb", null },
|
||||
{ "Test/resources/foo with space.resx", "RandomName", "Sample.vb", null },
|
||||
{ "Test/resources/foo with space.resx", "RandomName", "Sample.vb", "bar with space.resx"},
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.resx"), null, "Sample.vb", null },
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.resx"), "RandomName", "Sample.vb", null },
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.resx"), "RandomName", "Sample.vb", "bar with space.resx"},
|
||||
|
||||
// W/o dependent file
|
||||
{ "foo with space.resx", null, null, null },
|
||||
@@ -52,8 +53,8 @@ namespace MonoTests.Microsoft.Build.Tasks
|
||||
// can't find a C# class in the .vb file
|
||||
{ "foo with space.de.resx", "RandomName", junk_file, "bar with space.fr.resx" },
|
||||
|
||||
{ "Test/resources/foo with space.de.resx", null, "Sample.vb", null },
|
||||
{ "Test/resources/foo with space.de.resx", "RandomName", "Sample.vb", null},
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.de.resx"), null, "Sample.vb", null },
|
||||
{ TestResourceHelper.GetFullPathOfResource ("Test/resources/foo with space.de.resx"), "RandomName", "Sample.vb", null},
|
||||
|
||||
// W/o dependent file
|
||||
{ "foo with space.de.resx", null, null, null },
|
||||
|
||||
@@ -34,6 +34,8 @@ using Microsoft.Build.Tasks;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.Tasks {
|
||||
|
||||
class MCExtended : ManagedCompiler {
|
||||
@@ -683,7 +685,7 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
mc.References = null;
|
||||
Assert.IsTrue (mc.CheckAllReferencesExistOnDisk (), "A2");
|
||||
|
||||
string path = Path.Combine (Path.Combine ("Test", "resources"), "test.cs");
|
||||
string path = TestResourceHelper.GetFullPathOfResource ("Test/resources/test.cs");
|
||||
mc.References = new ITaskItem [1] { new TaskItem (path) };
|
||||
Assert.IsTrue (mc.CheckAllReferencesExistOnDisk (), "A3");
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ using Microsoft.Build.Tasks;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.Tasks {
|
||||
|
||||
[TestFixture]
|
||||
@@ -67,7 +69,7 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
{
|
||||
engine = new Engine (Consts.BinPath);
|
||||
project = engine.CreateNewProject ();
|
||||
project.LoadXml (ResolveAssembly (null, @"Test\resources\test.dll"));
|
||||
project.LoadXml (ResolveAssembly (null, TestResourceHelper.GetFullPathOfResource ("Test/resources/test.dll")));
|
||||
|
||||
Assert.IsTrue (project.Build ("A"), "A1");
|
||||
big = project.GetEvaluatedItemsByName ("ResolvedFiles");
|
||||
@@ -80,7 +82,7 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
{
|
||||
engine = new Engine (Consts.BinPath);
|
||||
project = engine.CreateNewProject ();
|
||||
project.LoadXml (ResolveAssembly (null, @"Test\resources\binary\FancyStuff.dll"));
|
||||
project.LoadXml (ResolveAssembly (null, TestResourceHelper.GetFullPathOfResource ("Test/resources/binary/FancyStuff.dll")));
|
||||
|
||||
Assert.IsTrue (project.Build ("A"), "A1");
|
||||
big = project.GetEvaluatedItemsByName ("ResolvedFiles");
|
||||
@@ -97,7 +99,7 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
{
|
||||
engine = new Engine (Consts.BinPath);
|
||||
project = engine.CreateNewProject ();
|
||||
project.LoadXml (ResolveAssembly (null, @"Test\resources\binary\SimpleWrite.dll"));
|
||||
project.LoadXml (ResolveAssembly (null, TestResourceHelper.GetFullPathOfResource ("Test/resources/binary/SimpleWrite.dll")));
|
||||
|
||||
Assert.IsTrue (project.Build ("A"), "A1");
|
||||
big = project.GetEvaluatedItemsByName ("ResolvedFiles");
|
||||
@@ -113,7 +115,7 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
{
|
||||
engine = new Engine (Consts.BinPath);
|
||||
project = engine.CreateNewProject ();
|
||||
project.LoadXml (ResolveAssembly (null, @"Test\resources\binary\Testing.dll"));
|
||||
project.LoadXml (ResolveAssembly (null, TestResourceHelper.GetFullPathOfResource ("Test/resources/binary/Testing.dll")));
|
||||
|
||||
Assert.IsTrue (project.Build ("A"), "A1");
|
||||
big = project.GetEvaluatedItemsByName ("ResolvedFiles");
|
||||
@@ -129,7 +131,7 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
{
|
||||
engine = new Engine (Consts.BinPath);
|
||||
project = engine.CreateNewProject ();
|
||||
project.LoadXml (ResolveAssembly (null, @"Test\resources\binary\XbuildReferenceBugTest.exe"));
|
||||
project.LoadXml (ResolveAssembly (null, TestResourceHelper.GetFullPathOfResource ("Test/resources/binary/XbuildReferenceBugTest.exe")));
|
||||
|
||||
Assert.IsTrue (project.Build ("A"), "A1");
|
||||
big = project.GetEvaluatedItemsByName ("ResolvedFiles");
|
||||
@@ -148,7 +150,7 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
{
|
||||
engine = new Engine (Consts.BinPath);
|
||||
project = engine.CreateNewProject ();
|
||||
project.LoadXml (ResolveAssembly (null, @"Test\resources\binary\FancyStuff.dll", @"Test\resources\binary\XbuildReferenceBugTest.exe"));
|
||||
project.LoadXml (ResolveAssembly (null, TestResourceHelper.GetFullPathOfResource ("Test/resources/binary/FancyStuff.dll"), TestResourceHelper.GetFullPathOfResource ("Test/resources/binary/XbuildReferenceBugTest.exe")));
|
||||
|
||||
Assert.IsTrue (project.Build ("A"), "A1");
|
||||
big = project.GetEvaluatedItemsByName ("ResolvedFiles");
|
||||
@@ -167,7 +169,7 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
{
|
||||
engine = new Engine (Consts.BinPath);
|
||||
project = engine.CreateNewProject ();
|
||||
project.LoadXml (ResolveAssembly (null, @"Test\resources\binary\XbuildReferenceBugTest.exe", @"Test\resources\binary\XbuildReferenceBugTest2.exe"));
|
||||
project.LoadXml (ResolveAssembly (null, TestResourceHelper.GetFullPathOfResource ("Test/resources/binary/XbuildReferenceBugTest.exe"), TestResourceHelper.GetFullPathOfResource ("Test/resources/binary/XbuildReferenceBugTest2.exe")));
|
||||
|
||||
Assert.IsTrue (project.Build ("A"), "A1");
|
||||
big = project.GetEvaluatedItemsByName ("ResolvedFiles");
|
||||
|
||||
BIN
mcs/class/Microsoft.Build.Tasks/Test/resources/binary/FancyStuff.dll
Executable file
BIN
mcs/class/Microsoft.Build.Tasks/Test/resources/binary/FancyStuff.dll
Executable file
Binary file not shown.
Binary file not shown.
BIN
mcs/class/Microsoft.Build.Tasks/Test/resources/binary/SimpleWrite.dll
Executable file
BIN
mcs/class/Microsoft.Build.Tasks/Test/resources/binary/SimpleWrite.dll
Executable file
Binary file not shown.
Binary file not shown.
BIN
mcs/class/Microsoft.Build.Tasks/Test/resources/binary/Testing.dll
Executable file
BIN
mcs/class/Microsoft.Build.Tasks/Test/resources/binary/Testing.dll
Executable file
Binary file not shown.
Binary file not shown.
BIN
mcs/class/Microsoft.Build.Tasks/Test/resources/binary/XbuildReferenceBugTest.exe
Executable file
BIN
mcs/class/Microsoft.Build.Tasks/Test/resources/binary/XbuildReferenceBugTest.exe
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user