summaryrefslogtreecommitdiff
path: root/tests/src/readytorun
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2015-08-28 12:12:28 +0200
committerJan Vorlicek <janvorli@microsoft.com>2015-08-28 19:57:29 +0200
commitb842c006b4231fcfcb9fb6e9872d895e34759d4a (patch)
treee2ed483d8c7b97c9b8860c1b0886a6438a85ce0a /tests/src/readytorun
parentbb1f4addbad0e14f3ce2cddbdf101d65fc3c0627 (diff)
downloadcoreclr-b842c006b4231fcfcb9fb6e9872d895e34759d4a.tar.gz
coreclr-b842c006b4231fcfcb9fb6e9872d895e34759d4a.tar.bz2
coreclr-b842c006b4231fcfcb9fb6e9872d895e34759d4a.zip
Ensure ReadyToRun test verifies version resiliency
This change modifies the ReadyToRun test so that it verifies assembly version resiliency.
Diffstat (limited to 'tests/src/readytorun')
-rw-r--r--tests/src/readytorun/main.cs7
-rw-r--r--tests/src/readytorun/mainv1.csproj11
-rw-r--r--tests/src/readytorun/mainv2.csproj14
-rw-r--r--tests/src/readytorun/testv1/app.config39
-rw-r--r--tests/src/readytorun/testv1/packages.config13
-rw-r--r--tests/src/readytorun/testv1/testv1.csproj (renamed from tests/src/readytorun/testv1.csproj)6
-rw-r--r--tests/src/readytorun/testv2/app.config39
-rw-r--r--tests/src/readytorun/testv2/packages.config13
-rw-r--r--tests/src/readytorun/testv2/testv2.csproj (renamed from tests/src/readytorun/testv2.csproj)6
9 files changed, 125 insertions, 23 deletions
diff --git a/tests/src/readytorun/main.cs b/tests/src/readytorun/main.cs
index 8604a3ef96..0a386ca9b5 100644
--- a/tests/src/readytorun/main.cs
+++ b/tests/src/readytorun/main.cs
@@ -237,12 +237,7 @@ class Program
public void TestMultipleLoads()
{
-#if V2
- string testVersion = "2";
-#else
- string testVersion = "1";
-#endif
- Assembly a = LoadFromAssemblyPath(Path.Combine(Directory.GetCurrentDirectory(), "NI", "testv" + testVersion + ".ni.dll"));
+ Assembly a = LoadFromAssemblyPath(Path.Combine(Directory.GetCurrentDirectory(), "NI", "test.ni.dll"));
Assert.AreEqual(AssemblyLoadContext.GetLoadContext(a), this);
}
diff --git a/tests/src/readytorun/mainv1.csproj b/tests/src/readytorun/mainv1.csproj
index cc47339ea2..a64c4a2351 100644
--- a/tests/src/readytorun/mainv1.csproj
+++ b/tests/src/readytorun/mainv1.csproj
@@ -28,7 +28,7 @@
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="testv1.csproj">
+ <ProjectReference Include="testv1\testv1.csproj">
<Project>{F74F55A1-DFCF-4C7C-B462-E96E1D0BB667}</Project>
</ProjectReference>
</ItemGroup>
@@ -43,17 +43,18 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
- <Reference Include="testv1">
- <HintPath>$(TargetDir)\testv1.dll</HintPath>
+ <Reference Include="test">
+ <HintPath>$(TargetDir)\testv1\test.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup>
<_CLRTestPreCommands><![CDATA[
$(_CLRTestPreCommands)
IF not exist NI mkdir NI
-%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\testv1.ni.dll testv1.dll
+COPY /Y testv1\test.dll test.dll
+%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\test.ni.dll test.dll
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\mainv1.ni.exe mainv1.exe
- ]]></_CLRTestPreCommands>
+]]></_CLRTestPreCommands>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
diff --git a/tests/src/readytorun/mainv2.csproj b/tests/src/readytorun/mainv2.csproj
index d52265385c..dab367811e 100644
--- a/tests/src/readytorun/mainv2.csproj
+++ b/tests/src/readytorun/mainv2.csproj
@@ -15,7 +15,7 @@
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
- <DefineConstants>$(DefineConstants);STATIC;CORECLR;V2</DefineConstants>
+ <DefineConstants>$(DefineConstants);STATIC;CORECLR</DefineConstants>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
@@ -28,8 +28,8 @@
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="testv2.csproj">
- <Project>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</Project>
+ <ProjectReference Include="testv1\testv1.csproj">
+ <Project>{F74F55A1-DFCF-4C7C-B462-E96E1D0BB667}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@@ -43,16 +43,18 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
- <Reference Include="testv2">
- <HintPath>$(TargetDir)\testv2.dll</HintPath>
+ <Reference Include="test">
+ <HintPath>$(TargetDir)\testv1\test.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup>
<_CLRTestPreCommands><![CDATA[
$(_CLRTestPreCommands)
IF not exist NI mkdir NI
-%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\testv2.ni.dll testv2.dll
+COPY /Y testv1\test.dll test.dll
%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\mainv2.ni.exe mainv2.exe
+COPY /Y testv2\test.dll test.dll
+%Core_Root%\crossgen /readytorun /platform_assemblies_paths %Core_Root%%3B%25CD% /out NI\test.ni.dll test.dll
]]></_CLRTestPreCommands>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
diff --git a/tests/src/readytorun/testv1/app.config b/tests/src/readytorun/testv1/app.config
new file mode 100644
index 0000000000..7f13fbce41
--- /dev/null
+++ b/tests/src/readytorun/testv1/app.config
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/tests/src/readytorun/testv1/packages.config b/tests/src/readytorun/testv1/packages.config
new file mode 100644
index 0000000000..a1da6980b1
--- /dev/null
+++ b/tests/src/readytorun/testv1/packages.config
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Collections" version="4.0.10-beta-22512" />
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.IO" version="4.0.10-beta-22412" />
+ <package id="System.IO.FileSystem" version="4.0.0-beta-22412" />
+ <package id="System.Reflection" version="4.0.10-beta-22512" />
+ <package id="System.Reflection.Extensions" version="4.0.0-beta-22412" />
+ <package id="System.Runtime" version="4.0.20-beta-22412" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Runtime.InteropServices" version="4.0.20-beta-22412" />
+ <package id="System.Runtime.Loader" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/readytorun/testv1.csproj b/tests/src/readytorun/testv1/testv1.csproj
index 041f92e7f8..4d881e6c44 100644
--- a/tests/src/readytorun/testv1.csproj
+++ b/tests/src/readytorun/testv1/testv1.csproj
@@ -4,7 +4,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <AssemblyName>testv1</AssemblyName>
+ <AssemblyName>test</AssemblyName>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F74F55A1-DFCF-4C7C-B462-E96E1D0BB667}</ProjectGuid>
<OutputType>library</OutputType>
@@ -12,7 +12,7 @@
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<DefineConstants>$(DefineConstants);STATIC;CORECLR</DefineConstants>
@@ -28,7 +28,7 @@
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
- <Compile Include="test.cs" />
+ <Compile Include="..\test.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
diff --git a/tests/src/readytorun/testv2/app.config b/tests/src/readytorun/testv2/app.config
new file mode 100644
index 0000000000..7f13fbce41
--- /dev/null
+++ b/tests/src/readytorun/testv2/app.config
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration> \ No newline at end of file
diff --git a/tests/src/readytorun/testv2/packages.config b/tests/src/readytorun/testv2/packages.config
new file mode 100644
index 0000000000..a1da6980b1
--- /dev/null
+++ b/tests/src/readytorun/testv2/packages.config
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="System.Collections" version="4.0.10-beta-22512" />
+ <package id="System.Console" version="4.0.0-beta-22405" />
+ <package id="System.IO" version="4.0.10-beta-22412" />
+ <package id="System.IO.FileSystem" version="4.0.0-beta-22412" />
+ <package id="System.Reflection" version="4.0.10-beta-22512" />
+ <package id="System.Reflection.Extensions" version="4.0.0-beta-22412" />
+ <package id="System.Runtime" version="4.0.20-beta-22412" />
+ <package id="System.Runtime.Extensions" version="4.0.10-beta-22412" />
+ <package id="System.Runtime.InteropServices" version="4.0.20-beta-22412" />
+ <package id="System.Runtime.Loader" version="4.0.0-beta-22512" />
+</packages>
diff --git a/tests/src/readytorun/testv2.csproj b/tests/src/readytorun/testv2/testv2.csproj
index 8771df06b5..c2362982bd 100644
--- a/tests/src/readytorun/testv2.csproj
+++ b/tests/src/readytorun/testv2/testv2.csproj
@@ -4,7 +4,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <AssemblyName>testv2</AssemblyName>
+ <AssemblyName>test</AssemblyName>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
<OutputType>library</OutputType>
@@ -12,7 +12,7 @@
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<DefineConstants>$(DefineConstants);STATIC;CORECLR;V2</DefineConstants>
@@ -28,7 +28,7 @@
</CodeAnalysisDependentAssemblyPaths>
</ItemGroup>
<ItemGroup>
- <Compile Include="test.cs" />
+ <Compile Include="..\test.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />