Skip to content

Commit 1c80769

Browse files
mdh1418Mitchell Hwang
and
Mitchell Hwang
authored
[tests][mobile] Enable diagnostic_tracing for mobile runtime tests (#60879)
* [mobile] Add diagnostics tracing to Android iOS mobile runtime components * [tests] Reenable eventactivityidcontrol test on Android Reenables eventactivityidcontrol now that diagnostics_tracing runtime component is included * [tests] Enable non-eventpipe Android tracing tests to emulate desktop mono * Revert "[tests] Enable non-eventpipe Android tracing tests to emulate desktop mono" This reverts commit 3b8ef23. * [tests] Skip JitOptimizationSensitive script on mono * Update Android GetStandardTransport TcpClient initialization * [tests] Skip diagnostics tests on browser and Android Co-authored-by: Mitchell Hwang <[email protected]>
1 parent 7814396 commit 1c80769

File tree

5 files changed

+60
-7
lines changed

5 files changed

+60
-7
lines changed

src/tests/Common/CLRTest.Execute.Bash.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ then
9696
exit $(IncompatibleTestBashScriptExitCode)
9797
fi
9898
]]></BashCLRTestEnvironmentCompatibilityCheck>
99-
<BashCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true'">
99+
<BashCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true' And '$(RuntimeFlavor)' != 'mono'">
100100
<![CDATA[
101101
$(BashCLRTestEnvironmentCompatibilityCheck)
102102
if [[ ( ! -z "$COMPlus_JitStress" ) || ( ! -z "$COMPlus_JitStressRegs" ) || ( ! -z "$COMPlus_JITMinOpts" ) || ( ! -z "$COMPlus_TailcallStress" ) ]]

src/tests/Common/CLRTest.Execute.Batch.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ IF NOT "%RunTieringTest%"=="" (
9393
Exit /b 0
9494
)
9595
]]></BatchCLRTestEnvironmentCompatibilityCheck>
96-
<BatchCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true'">
96+
<BatchCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true' And '$(RuntimeFlavor)' != 'mono'">
9797
<![CDATA[
9898
$(BatchCLRTestEnvironmentCompatibilityCheck)
9999
REM JitOptimizationSensitive includes our set of tests which cannot run under:

src/tests/build.proj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@
197197
<AppDir>$(BuildDir)\apk</AppDir>
198198
<FinalApkPath>$(XUnitTestBinBase)$(CategoryWithSlash)\$(Category).apk</FinalApkPath>
199199
<StripDebugSymbols>False</StripDebugSymbols>
200+
<RuntimeComponents>diagnostics_tracing</RuntimeComponents>
201+
<DiagnosticPorts>127.0.0.1:9000,nosuspend,listen</DiagnosticPorts>
200202
<StripDebugSymbols Condition="'$(Configuration)' == 'Release'">True</StripDebugSymbols>
201203
<MicrosoftNetCoreAppRuntimePackDir>$(ArtifactsBinDir)microsoft.netcore.app.runtime.android-$(TargetArchitecture)\$(Configuration)\runtimes\android-$(TargetArchitecture)\</MicrosoftNetCoreAppRuntimePackDir>
202204
<AndroidAbi Condition="'$(TargetArchitecture)' == 'arm64'">arm64-v8a</AndroidAbi>
@@ -244,6 +246,8 @@
244246
RuntimeIdentifier="$(RuntimeIdentifier)"
245247
ProjectName="$(Category)"
246248
MonoRuntimeHeaders="$(MicrosoftNetCoreAppRuntimePackDir)/native/include/mono-2.0"
249+
RuntimeComponents="$(RuntimeComponents)"
250+
DiagnosticPorts="$(DiagnosticPorts)"
247251
StripDebugSymbols="$(StripDebugSymbols)"
248252
ForceInterpreter="$(MonoInterp)"
249253
AppDir="$(BuildDir)"

src/tests/issues.targets

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3397,6 +3397,53 @@
33973397
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_64125/Runtime_64125/**">
33983398
<Issue>needs triage</Issue>
33993399
</ExcludeList>
3400+
3401+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/incrementingeventcounter/**">
3402+
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
3403+
</ExcludeList>
3404+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/eventcounter/**">
3405+
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
3406+
</ExcludeList>
3407+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/runtimecounters/**">
3408+
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
3409+
</ExcludeList>
3410+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/incrementingpollingcounter/**">
3411+
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
3412+
</ExcludeList>
3413+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/pollingcounter/**">
3414+
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
3415+
</ExcludeList>
3416+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/gh53564/**">
3417+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
3418+
</ExcludeList>
3419+
3420+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/reverse/**">
3421+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
3422+
</ExcludeList>
3423+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/bigevent/**">
3424+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient and system.diagnostics.process not supported</Issue>
3425+
</ExcludeList>
3426+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/processinfo2/**">
3427+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient and system.diagnostics.process not supported</Issue>
3428+
</ExcludeList>
3429+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/diagnosticport/**">
3430+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
3431+
</ExcludeList>
3432+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/processinfo/**">
3433+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient and system.diagnostics.process not supported</Issue>
3434+
</ExcludeList>
3435+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/buffersize/**">
3436+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
3437+
</ExcludeList>
3438+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/reverseouter/**">
3439+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
3440+
</ExcludeList>
3441+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/processenvironment/**">
3442+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
3443+
</ExcludeList>
3444+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/pauseonstart/**">
3445+
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
3446+
</ExcludeList>
34003447
</ItemGroup>
34013448

34023449
<ItemGroup Condition=" $(TargetOS) == 'Android' " >
@@ -3562,14 +3609,11 @@
35623609
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Performance/CodeQuality/SIMD/RayTracer/RayTracer/**">
35633610
<Issue>https://github.com/dotnet/runtime/issues/54906</Issue>
35643611
</ExcludeList>
3565-
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventactivityidcontrol/eventactivityidcontrol/**">
3566-
<Issue>https://github.com/dotnet/runtime/issues/52763</Issue>
3567-
</ExcludeList>
35683612
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/complus_config/name_config_with_pid/**">
35693613
<Issue>https://github.com/dotnet/runtime/issues/54974</Issue>
35703614
</ExcludeList>
3571-
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/eventsourceerror/**">
3572-
<Issue> needs triage </Issue>
3615+
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/**">
3616+
<Issue>Need to update with Microsoft.Diagnostics.NETCore.Client port https://github.com/dotnet/runtime/pull/64358</Issue>
35733617
</ExcludeList>
35743618
<ExcludeList Include = "$(XunitTestBinBase)/Interop/UnmanagedCallConv/UnmanagedCallConvTest/**">
35753619
<Issue>https://github.com/dotnet/runtime/issues/53077</Issue>

src/tests/tracing/eventpipe/common/IpcUtils.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,11 @@ public static Stream GetStandardTransport(int processId)
446446
namedPipe.Connect(3);
447447
return namedPipe;
448448
}
449+
else if (OperatingSystem.IsAndroid())
450+
{
451+
TcpClient client = new TcpClient("127.0.0.1", 9000);
452+
return client.GetStream();
453+
}
449454
else
450455
{
451456
string ipcPort;

0 commit comments

Comments
 (0)