Skip to content

Commit 182cdc3

Browse files
committed
[6.0] Disable DllImportSearchPathsTest in mobile
Loading assemblies from subdirectories is not supported, this ports the fix from main to 6.0 Fixes #86271
1 parent 4422e20 commit 182cdc3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/tests/Interop/DllImportSearchPaths/DllImportSearchPathsTest.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@
1010
public class DllImportSearchPathsTest
1111
{
1212
private static string Subdirectory => Path.Combine(NativeLibraryToLoad.GetDirectory(), "subdirectory");
13+
private static bool CanLoadAssemblyInSubdirectory =>
14+
!TestLibrary.Utilities.IsMonoLLVMFULLAOT &&
15+
!OperatingSystem.IsAndroid() &&
16+
!OperatingSystem.IsIOS() &&
17+
!OperatingSystem.IsTvOS() &&
18+
!OperatingSystem.IsBrowser();
1319

1420
static int Main(string[] args)
1521
{
1622
try
1723
{
1824
AssemblyDirectory_NotFound();
19-
if (!TestLibrary.Utilities.IsMonoLLVMFULLAOT)
25+
if (CanLoadAssemblyInSubdirectory)
2026
AssemblyDirectory_Found();
2127

2228
if (OperatingSystem.IsWindows())

src/tests/issues.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2895,6 +2895,9 @@
28952895
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/DevDiv_461649/DevDiv_461649/**">
28962896
<Issue>https://github.com/dotnet/runtime/issues/53353</Issue>
28972897
</ExcludeList>
2898+
<ExcludeList Include="$(XunitTestBinBase)/Interop/DllImportSearchPaths/DllImportSearchPathsTest/**">
2899+
<Issue>Loads an assembly from file</Issue>
2900+
</ExcludeList>
28982901
</ItemGroup>
28992902

29002903
<ItemGroup Condition=" $(TargetOS) == 'Android' And '$(TargetArchitecture)' == 'arm64' " >

0 commit comments

Comments
 (0)