Skip to content

Commit ffb872f

Browse files
committed
Address pull request feedback and fix linux test run script to prevent copying test assemblies to the 'Overlay' directory.
Commit migrated from dotnet/corefx@514f4c7
1 parent 696365c commit ffb872f

10 files changed

+15
-15
lines changed

src/libraries/System.Runtime.Loader/System.Runtime.Loader.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VisualStudioVersion = 14.0.23107.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Runtime.Loader.Tests", "tests\System.Runtime.Loader.Tests.csproj", "{701CB3BC-00DC-435D-BDE4-C5FC29A708A7}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Runtime.Loader.TestAssembly", "tests\System.Runtime.Loader.TestAssembly\System.Runtime.Loader.TestAssembly.csproj", "{396D6EBF-60BD-4DAF-8783-FB403E070A56}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Runtime.Loader.Test.Assembly", "tests\System.Runtime.Loader.Test.Assembly\System.Runtime.Loader.Test.Assembly.csproj", "{396D6EBF-60BD-4DAF-8783-FB403E070A56}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/libraries/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace System.Runtime.Loader.Tests
1313
{
1414
public class AssemblyLoadContextTest
1515
{
16-
const string TESTASSEMBLY = "System.Runtime.Loader.TestAssembly";
16+
private const string TestAssembly = "System.Runtime.Loader.Test.Assembly";
1717

1818
[Fact]
1919
public static void GetAssemblyNameTest_ValidAssembly()
@@ -40,7 +40,7 @@ public static void GetAssemblyNameTest_NullParameter()
4040
[Fact]
4141
public static void LoadAssemblyByPath_ValidUserAssembly()
4242
{
43-
var asmName = new AssemblyName(TESTASSEMBLY);
43+
var asmName = new AssemblyName(TestAssembly);
4444
var loadContext = new ResourceAssemblyLoadContext();
4545
loadContext.LoadBy = LoadBy.Path;
4646

@@ -53,7 +53,7 @@ public static void LoadAssemblyByPath_ValidUserAssembly()
5353
[Fact]
5454
public static void LoadAssemblyByStream_ValidUserAssembly()
5555
{
56-
var asmName = new AssemblyName(TESTASSEMBLY);
56+
var asmName = new AssemblyName(TestAssembly);
5757
var loadContext = new ResourceAssemblyLoadContext();
5858
loadContext.LoadBy = LoadBy.Stream;
5959

@@ -90,14 +90,14 @@ public static void LoadFromAssemblyName_ValidTrustedPlatformAssembly()
9090
[Fact]
9191
public static void GetLoadContextTest_ValidUserAssembly()
9292
{
93-
var asmName = new AssemblyName(TESTASSEMBLY);
94-
var loadContext = new ResourceAssemblyLoadContext();
95-
loadContext.LoadBy = LoadBy.Stream;
93+
var asmName = new AssemblyName(TestAssembly);
94+
var expectedContext = new ResourceAssemblyLoadContext();
95+
expectedContext.LoadBy = LoadBy.Stream;
9696

97-
var asm = loadContext.LoadFromAssemblyName(asmName);
98-
var context = AssemblyLoadContext.GetLoadContext(asm);
97+
var asm = expectedContext.LoadFromAssemblyName(asmName);
98+
var actualContext = AssemblyLoadContext.GetLoadContext(asm);
9999

100-
Assert.True(context == loadContext);
100+
Assert.Equal(expectedContext, actualContext);
101101
}
102102

103103
[Fact]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<OutputType>Library</OutputType>
88
<AppDesignerFolder>Properties</AppDesignerFolder>
9-
<RootNamespace>System.Runtime.Loader.TestAssembly</RootNamespace>
10-
<AssemblyName>System.Runtime.Loader.TestAssembly</AssemblyName>
9+
<RootNamespace>System.Runtime.Loader.Test.Assembly</RootNamespace>
10+
<AssemblyName>System.Runtime.Loader.Test.Assembly</AssemblyName>
1111
<ProjectGuid>{396D6EBF-60BD-4DAF-8783-FB403E070A56}</ProjectGuid>
1212
</PropertyGroup>
1313
<ItemGroup>

src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.TestAssembly/project.lock.json renamed to src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Test.Assembly/project.lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"locked": false,
2+
"locked": true,
33
"version": -9996,
44
"targets": {
55
"DNXCore,Version=v5.0": {

src/libraries/System.Runtime.Loader/tests/System.Runtime.Loader.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<None Include="project.json" />
2020
</ItemGroup>
2121
<ItemGroup>
22-
<EmbeddedResource Include="System.Runtime.Loader.TestAssembly.dll" />
22+
<EmbeddedResource Include="System.Runtime.Loader.Test.Assembly.dll" />
2323
</ItemGroup>
2424
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
2525
<PropertyGroup>

src/libraries/run-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ create_test_overlay()
130130
echo "Corefx binaries not found at $CoreFxBins"
131131
exit 1
132132
fi
133-
find $CoreFxBins -name '*.dll' -exec cp '{}' "$OverlayDir" ";"
133+
find $CoreFxBins -name '*.dll' -and -not -name "*Test*" -exec cp '{}' "$OverlayDir" ";"
134134

135135
# Then the native CoreFX binaries
136136
#

0 commit comments

Comments
 (0)