Skip to content

Commit

Permalink
WASM: Enable GetAssemblyNameTest_ValidAssembly and add hook to includ…
Browse files Browse the repository at this point in the history
…e custom files into vfs (#40032)
  • Loading branch information
safern authored Jul 29, 2020
1 parent b2c7585 commit e10da01
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
15 changes: 2 additions & 13 deletions eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -132,24 +132,13 @@
<WasmFilesToIncludeInFileSystem Include="@(ContentWithTargetPath)" />
<WasmFilesToIncludeInFileSystem Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.BuildReference)' == 'true' and !$([System.String]::new('%(ReferenceCopyLocalPaths.Identity)').EndsWith('.resources.dll'))" />
<WasmFilesToIncludeInFileSystem Include="@(WasmSatelliteAssemblies)" TargetPath="%(WasmSatelliteAssemblies.CultureName)\%(WasmSatelliteAssemblies.Filename)%(WasmSatelliteAssemblies.Extension)" />
<!-- Include files specified by test projects from publish dir -->
<WasmFilesToIncludeInFileSystem Include="@(WasmFilesToIncludeFromPublishDir -> '$(PublishDir)%(Identity)')" />
<ExtraAssemblies Include="$(PublishDir)$(AssemblyName).dll" />
<!-- We need these facades for some tests. -->
<ExtraAssemblies Include="$(PublishDir)mscorlib.dll" />
<ExtraAssemblies Include="$(PublishDir)System.Drawing.dll" />
</ItemGroup>
<!-- these tests load assemblies from the file system -->
<ItemGroup Condition="'$(AssemblyName)' == 'System.Reflection.MetadataLoadContext.Tests'">
<WasmFilesToIncludeInFileSystem Include="$(PublishDir)System.Private.CoreLib.dll" />
<WasmFilesToIncludeInFileSystem Include="$(PublishDir)System.Reflection.MetadataLoadContext.Tests.dll" />
<WasmFilesToIncludeInFileSystem Include="$(PublishDir)mscorlib.dll" />
</ItemGroup>
<ItemGroup Condition="'$(AssemblyName)' == 'System.Reflection.Metadata.Tests'">
<WasmFilesToIncludeInFileSystem Include="$(PublishDir)System.Reflection.Metadata.Tests.dll" />
</ItemGroup>
<ItemGroup Condition="'$(AssemblyName)' == 'System.Reflection.Tests'">
<WasmFilesToIncludeInFileSystem Include="$(PublishDir)System.Reflection.Tests.dll" />
<WasmFilesToIncludeInFileSystem Include="$(PublishDir)System.Reflection.Tests.pdb" />
</ItemGroup>
<Error Condition="!Exists('$(MicrosoftNetCoreAppRuntimePackRidDir)')" Text="MicrosoftNetCoreAppRuntimePackRidDir=$(MicrosoftNetCoreAppRuntimePackRidDir) doesn't exist" />
<WasmAppBuilder
AppDir="$(BundleDir)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,7 @@
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="$(SystemSecurityCryptographyAlgorithmsVersion)" />
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<WasmFilesToIncludeFromPublishDir Include="$(AssemblyName).dll" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,9 @@
<ItemGroup>
<ProjectReference Include="..\src\System.Reflection.MetadataLoadContext.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<WasmFilesToIncludeFromPublishDir Include="System.Private.CoreLib.dll" />
<WasmFilesToIncludeFromPublishDir Include="System.Reflection.MetadataLoadContext.Tests.dll" />
<WasmFilesToIncludeFromPublishDir Include="mscorlib.dll" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,8 @@
<ProjectReference Include="TestExe\System.Reflection.TestExe.csproj" />
<ProjectReference Include="TestAssembly\TestAssembly.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<WasmFilesToIncludeFromPublishDir Include="$(AssemblyName).dll" />
<WasmFilesToIncludeFromPublishDir Include="$(AssemblyName).pdb" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public partial class AssemblyLoadContextTest
private const string TestAssemblyNotSupported = "System.Runtime.Loader.Test.AssemblyNotSupported";

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/39379", TestPlatforms.Browser)]
public static void GetAssemblyNameTest_ValidAssembly()
{
var expectedName = typeof(AssemblyLoadContextTest).Assembly.GetName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@
<ProjectReference Include="ReferencedClassLib\ReferencedClassLib.csproj" />
<ProjectReference Include="ReferencedClassLibNeutralIsSatellite\ReferencedClassLibNeutralIsSatellite.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'Browser'">
<WasmFilesToIncludeFromPublishDir Include="$(AssemblyName).dll" />
</ItemGroup>
</Project>

0 comments on commit e10da01

Please sign in to comment.