-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84f1769
commit a85fb2b
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/tests/Loader/ExternalAssemblyProbe/ExternalAssemblyProbe.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using Xunit; | ||
|
||
public unsafe class ExternalAssemblyProbe | ||
{ | ||
[Fact] | ||
public static void ExternalAppAssemblies() | ||
{ | ||
// In order to get to this point, the runtime must have been able to find the app assemblies | ||
// Check that the TPA is indeed empty - that is, the runtime is not relying on that property. | ||
string tpa = AppContext.GetData("TRUSTED_PLATFORM_ASSEMBLIES") as string; | ||
Assert.True(string.IsNullOrEmpty(tpa), "TRUSTED_PLATFORM_ASSEMBLIES should be empty"); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/tests/Loader/ExternalAssemblyProbe/ExternalAssemblyProbe.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<!-- Needed for CLRTestEnvironmentVariable --> | ||
<RequiresProcessIsolation>true</RequiresProcessIsolation> | ||
<NativeAotIncompatible>true</NativeAotIncompatible> | ||
<!-- External assembly probe via host-runtime contract is not implemented. | ||
The test uses probing to start at all, so it needs to be disabled in the project, not via an attribute --> | ||
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' != 'coreclr'">true</CLRTestTargetUnsupported> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="ExternalAssemblyProbe.cs" /> | ||
|
||
<CLRTestEnvironmentVariable Include="APP_ASSEMBLIES" Value="EXTERNAL" /> | ||
</ItemGroup> | ||
</Project> |