Skip to content

Commit 2d69514

Browse files
authored
[Android] Expand smoke tests for CoreCLR Android (#117767)
* Run disabled tests * Update tests to use ConditionalFact for platform detection * Revert changes * Update project exclusions and add smoke test projects for Android * Update platform skip condition
1 parent e4d2cd0 commit 2d69514

File tree

7 files changed

+11
-21
lines changed

7 files changed

+11
-21
lines changed

src/libraries/Microsoft.VisualBasic.Core/tests/ErrObjectTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.VisualBasic.Tests
1010
public class ErrObjectTests
1111
{
1212
[Fact]
13-
[ActiveIssue("https://github.com/dotnet/runtime/issues/114951", typeof(PlatformDetection), nameof(PlatformDetection.IsSingleFile))]
13+
[ActiveIssue("https://github.com/mono/mono/issues/14854", typeof(PlatformDetection), nameof(PlatformDetection.IsSingleFile))]
1414
[ActiveIssue("https://github.com/mono/mono/issues/14854", TestRuntimes.Mono)]
1515
public void Clear()
1616
{

src/libraries/System.Configuration.ConfigurationManager/tests/Mono/ConfigurationManagerTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ namespace MonoTests.System.Configuration
4242

4343
public class ConfigurationManagerTest
4444
{
45-
[Fact] // OpenExeConfiguration (ConfigurationUserLevel)
45+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles))] // OpenExeConfiguration (ConfigurationUserLevel)
4646
[ActiveIssue("https://github.com/dotnet/runtime/issues/21528", TargetFrameworkMonikers.NetFramework)]
47-
[ActiveIssue("https://github.com/dotnet/runtime/issues/114951", typeof(PlatformDetection), nameof(PlatformDetection.IsSingleFile))]
4847
public void OpenExeConfiguration1_UserLevel_None()
4948
{
5049
SysConfig config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
@@ -250,11 +249,10 @@ public void mapped_MachineConfig()
250249
Assert.Equal("machineconfig", fi.Name);
251250
}
252251

253-
[Fact]
252+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles))]
254253
// Doesn't pass on Mono
255254
// [Category("NotWorking")]
256255
[ActiveIssue("https://github.com/dotnet/runtime/issues/21528", TargetFrameworkMonikers.NetFramework)]
257-
[ActiveIssue("https://github.com/dotnet/runtime/issues/114951", typeof(PlatformDetection), nameof(PlatformDetection.IsSingleFile))]
258256
public void mapped_ExeConfiguration_null()
259257
{
260258
SysConfig config = ConfigurationManager.OpenMappedExeConfiguration(null, ConfigurationUserLevel.None);

src/libraries/System.Diagnostics.StackTrace/tests/StackTraceSymbolsTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ namespace System.Diagnostics.SymbolStore.Tests
1010
public class StackTraceSymbolsTests
1111
{
1212
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles))]
13-
[ActiveIssue("https://github.com/dotnet/runtime/issues/51399", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
14-
[ActiveIssue("https://github.com/dotnet/runtime/issues/114951", TestPlatforms.Android)]
13+
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst | TestPlatforms.Android, "Symbols are in a different location on mobile platforms")]
1514
public void StackTraceSymbolsDoNotLockFile()
1615
{
1716
var asmPath = AssemblyPathHelper.GetAssemblyLocation(typeof(StackTraceSymbolsTests).Assembly);

src/libraries/System.IO.Pipelines/tests/PipeWriterTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ public async Task WritesUsingGetMemoryWorks()
294294
}
295295

296296
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
297-
[ActiveIssue("https://github.com/dotnet/runtime/issues/114951",platforms: TestPlatforms.Android, runtimes: TestRuntimes.CoreCLR)]
298297
public async Task CompleteWithLargeWriteThrows()
299298
{
300299
var completeDelay = TimeSpan.FromMilliseconds(10);

src/libraries/System.Runtime/tests/System.Reflection.Tests/AssemblyTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,7 @@ public void AssemblyLoadFromBytesNeg()
844844
}
845845

846846
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.HasAssemblyFiles))]
847-
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst, "Symbols are in a different location on iOS/tvOS/MacCatalyst")]
848-
[ActiveIssue("https://github.com/dotnet/runtime/issues/114951", TestPlatforms.Android)]
847+
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst | TestPlatforms.Android, "Symbols are in a different location on mobile platforms")]
849848
public void AssemblyLoadFromBytesWithSymbols()
850849
{
851850
Assembly assembly = typeof(AssemblyTests).Assembly;

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ExceptionTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,8 @@ public static void Exception_TargetSite_Rethrow()
107107
Assert.Equal(nameof(ThrowException), ex.TargetSite.Name);
108108
}
109109

110-
[Fact]
110+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles))]
111111
[ActiveIssue("https://github.com/mono/mono/issues/15140", TestRuntimes.Mono)]
112-
[ActiveIssue("https://github.com/dotnet/runtime/issues/114951", TestPlatforms.Android)]
113112
public static void ThrowStatementDoesNotResetExceptionStackLineSameMethod()
114113
{
115114
(string, string, int) rethrownExceptionStackFrame = (null, null, 0);
@@ -137,10 +136,9 @@ private static (string, string, int) ThrowAndRethrowSameMethod(out (string, stri
137136
}
138137
}
139138

140-
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))]
139+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process), nameof(PlatformDetection.HasAssemblyFiles))]
141140
// [ActiveIssue(https://github.com/dotnet/runtime/issues/1871)] can't use ActiveIssue for archs
142141
[ActiveIssue("https://github.com/mono/mono/issues/15141", TestRuntimes.Mono)]
143-
[ActiveIssue("https://github.com/dotnet/runtime/issues/114951", TestPlatforms.Android)]
144142
public static void ThrowStatementDoesNotResetExceptionStackLineOtherMethod()
145143
{
146144
(string, string, int) rethrownExceptionStackFrame = (null, null, 0);

src/libraries/tests.proj

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,9 @@
225225
</ItemGroup>
226226

227227
<ItemGroup Condition="'$(TargetOS)' == 'android' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(RunDisablediOSTests)' != 'true'">
228-
<!-- https://github.com/dotnet/runtime/issues/114951 -->
228+
<!-- https://github.com/dotnet/runtime/issues/117045 -->
229229
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj" />
230+
<!-- https://github.com/dotnet/runtime/issues/114951 -->
230231
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.DiagnosticSource\tests\TestWithConfigSwitches\System.Diagnostics.DiagnosticSource.Switches.Tests.csproj" />
231232
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Resources.ResourceManager.Tests\System.Resources.ResourceManager.Tests.csproj" />
232233
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Runtime.Tests\InvariantTimezone\System.Runtime.InvariantTimezone.Tests.csproj" />
@@ -237,12 +238,6 @@
237238
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection.MetadataLoadContext\tests\System.Reflection.MetadataLoadContext.Tests.csproj" />
238239
</ItemGroup>
239240

240-
<ItemGroup Condition="'$(TargetOS)' == 'android' and '$(TargetArchitecture)' == 'x64' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(RunDisablediOSTests)' != 'true'">
241-
<!-- https://github.com/dotnet/runtime/issues/114951 -->
242-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.IO.Tests\System.IO.Tests.csproj" />
243-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Bcl.Cryptography\tests\Microsoft.Bcl.Cryptography.Tests.csproj" />
244-
</ItemGroup>
245-
246241
<ItemGroup Condition="'$(TargetOS)' == 'ios' and '$(RunDisablediOSTests)' != 'true'">
247242
<ProjectExclusions Include="$(MSBuildThisFileDirectory)*\tests\**\*.Tests.csproj" />
248243
</ItemGroup>
@@ -607,6 +602,8 @@
607602
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Net.Mail\tests\Functional\System.Net.Mail.Functional.Tests.csproj" />
608603
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Diagnostics.DiagnosticSource\tests\System.Diagnostics.DiagnosticSource.Tests.csproj" />
609604
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Diagnostics.Tracing\tests\System.Diagnostics.Tracing.Tests.csproj" />
605+
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Security.Cryptography\tests\System.Security.Cryptography.Tests.csproj" />
606+
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />
610607
<SmokeTestProject Include="$(RepoRoot)\src\tests\FunctionalTests\Android\Device_Emulator\JIT\*.Test.csproj"/>
611608
</ItemGroup>
612609

0 commit comments

Comments
 (0)