Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WASM: Enable GetAssemblyNameTest_ValidAssembly and add hook to include custom files into vfs #40032

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>