Skip to content

Commit

Permalink
Fix VersionTolerantSerialization to use active profile
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-safar committed Apr 19, 2012
1 parent b8d0df6 commit 3b8b49c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
43 changes: 22 additions & 21 deletions mcs/class/corlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,37 +93,38 @@ endif
vts = VersionTolerantSerialization
vtsdir = Test/System.Runtime.Serialization.Formatters.Binary/$(vts)
vtslibs = \
$(vtsdir)/$(vts)TestLib/1.0/Address.dll \
$(vtsdir)/$(vts)TestLib/2.0/Address.dll \
$(vtsdir)/$(vts)TestLib/3.0/Address.dll \
$(vtsdir)/$(vts)TestLib/4.0/Address.dll \
$(vtsdir)/$(vts)TestLib/5.0/Address.dll \
$(vtsdir)/$(vts)TestLib/6.0/Address.dll
$(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \
$(vtsdir)/$(PROFILE)_TestLib/2.0/Address.dll \
$(vtsdir)/$(PROFILE)_TestLib/3.0/Address.dll \
$(vtsdir)/$(PROFILE)_TestLib/4.0/Address.dll \
$(vtsdir)/$(PROFILE)_TestLib/5.0/Address.dll \
$(vtsdir)/$(PROFILE)_TestLib/6.0/Address.dll

test-vts: $(vtslibs) $(vtsdir)/BinarySerializationOverVersions.exe
test-vts: $(vtslibs) $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe

$(vtsdir)/$(vts)TestLib/%/Address.dll: $(vtsdir)/$(vts)TestLib/%/Address.cs
$(Q_MCS) $(MCS) -target:library -warn:0 $^
$(vtsdir)/$(PROFILE)_TestLib/%/Address.dll: $(vtsdir)/VersionTolerantSerializationTestLib/%/Address.cs
@mkdir -p $(dir $@)
$(CSCOMPILE) -target:library -r:$(corlib) -warn:0 -out:$@ $^

$(vtsdir)/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(vts)TestLib/1.0/Address.dll
$(Q_MCS) $(MCS) $(test_nunit_ref) -warn:0 \
-r:$(vtsdir)/$(vts)TestLib/1.0/Address.dll \
$(vtsdir)/BinarySerializationOverVersions.cs
@cp $(vtsdir)/$(vts)TestLib/1.0/Address.dll $(vtsdir)
$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll
$(CSCOMPILE) $(test_nunit_ref) -warn:0 -r:$(corlib) \
-r:$(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \
$(vtsdir)/BinarySerializationOverVersions.cs -out:$@
@cp $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(vtsdir)/$(PROFILE)_TestLib

# Need to define MONO_PATH to an absolute dir since the test is ran from a subdir
run-test-vts: test-vts
@echo Running vts tests...
$(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) -noshadow \
$(vtsdir)/BinarySerializationOverVersions.exe
$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe
test: test-vts
run-test: run-test-vts

EXTRA_DISTFILES += \
$(vtsdir)/$(vts)TestLib/1.0/Address.cs \
$(vtsdir)/$(vts)TestLib/2.0/Address.cs \
$(vtsdir)/$(vts)TestLib/3.0/Address.cs \
$(vtsdir)/$(vts)TestLib/4.0/Address.cs \
$(vtsdir)/$(vts)TestLib/5.0/Address.cs \
$(vtsdir)/$(vts)TestLib/6.0/Address.cs \
$(vtsdir)/TestLib/1.0/Address.cs \
$(vtsdir)/TestLib/2.0/Address.cs \
$(vtsdir)/TestLib/3.0/Address.cs \
$(vtsdir)/TestLib/4.0/Address.cs \
$(vtsdir)/TestLib/5.0/Address.cs \
$(vtsdir)/TestLib/6.0/Address.cs \
$(vtsdir)/BinarySerializationOverVersions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ private static string Find (string assemblyVersion)

private static string Find (string assemblyVersion, string path)
{
//Console.WriteLine ("Looking in " + path);
return Path.Combine (Path.Combine (path, assemblyVersion), assemblyFileName);
/*
Console.WriteLine ("Looking in " + path);
string test;
if (!path.Contains(assemblyVersion))
Expand Down Expand Up @@ -257,6 +259,7 @@ private static string Find (string assemblyVersion, string path)
"The tree is not predictible according to the philosophy of the test. (Stuck in {0})",
path));
}
*/
}

private void SerializeToFile (string filename)
Expand Down

0 comments on commit 3b8b49c

Please sign in to comment.