Skip to content

Commit

Permalink
[tests][mobile] Enable diagnostic_tracing for mobile runtime tests (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
mdh1418 and Mitchell Hwang authored Feb 10, 2022
1 parent 7814396 commit 1c80769
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/tests/Common/CLRTest.Execute.Bash.targets
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ then
exit $(IncompatibleTestBashScriptExitCode)
fi
]]></BashCLRTestEnvironmentCompatibilityCheck>
<BashCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true'">
<BashCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true' And '$(RuntimeFlavor)' != 'mono'">
<![CDATA[
$(BashCLRTestEnvironmentCompatibilityCheck)
if [[ ( ! -z "$COMPlus_JitStress" ) || ( ! -z "$COMPlus_JitStressRegs" ) || ( ! -z "$COMPlus_JITMinOpts" ) || ( ! -z "$COMPlus_TailcallStress" ) ]]
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Common/CLRTest.Execute.Batch.targets
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ IF NOT "%RunTieringTest%"=="" (
Exit /b 0
)
]]></BatchCLRTestEnvironmentCompatibilityCheck>
<BatchCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true'">
<BatchCLRTestEnvironmentCompatibilityCheck Condition="'$(JitOptimizationSensitive)' == 'true' And '$(RuntimeFlavor)' != 'mono'">
<![CDATA[
$(BatchCLRTestEnvironmentCompatibilityCheck)
REM JitOptimizationSensitive includes our set of tests which cannot run under:
Expand Down
4 changes: 4 additions & 0 deletions src/tests/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@
<AppDir>$(BuildDir)\apk</AppDir>
<FinalApkPath>$(XUnitTestBinBase)$(CategoryWithSlash)\$(Category).apk</FinalApkPath>
<StripDebugSymbols>False</StripDebugSymbols>
<RuntimeComponents>diagnostics_tracing</RuntimeComponents>
<DiagnosticPorts>127.0.0.1:9000,nosuspend,listen</DiagnosticPorts>
<StripDebugSymbols Condition="'$(Configuration)' == 'Release'">True</StripDebugSymbols>
<MicrosoftNetCoreAppRuntimePackDir>$(ArtifactsBinDir)microsoft.netcore.app.runtime.android-$(TargetArchitecture)\$(Configuration)\runtimes\android-$(TargetArchitecture)\</MicrosoftNetCoreAppRuntimePackDir>
<AndroidAbi Condition="'$(TargetArchitecture)' == 'arm64'">arm64-v8a</AndroidAbi>
Expand Down Expand Up @@ -244,6 +246,8 @@
RuntimeIdentifier="$(RuntimeIdentifier)"
ProjectName="$(Category)"
MonoRuntimeHeaders="$(MicrosoftNetCoreAppRuntimePackDir)/native/include/mono-2.0"
RuntimeComponents="$(RuntimeComponents)"
DiagnosticPorts="$(DiagnosticPorts)"
StripDebugSymbols="$(StripDebugSymbols)"
ForceInterpreter="$(MonoInterp)"
AppDir="$(BuildDir)"
Expand Down
54 changes: 49 additions & 5 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3397,6 +3397,53 @@
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Regression/JitBlue/Runtime_64125/Runtime_64125/**">
<Issue>needs triage</Issue>
</ExcludeList>

<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/incrementingeventcounter/**">
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/eventcounter/**">
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/runtimecounters/**">
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/incrementingpollingcounter/**">
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/pollingcounter/**">
<Issue>System.Threading.Thread.UnsafeStart not supported</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventcounter/gh53564/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
</ExcludeList>

<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/reverse/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/bigevent/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient and system.diagnostics.process not supported</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/processinfo2/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient and system.diagnostics.process not supported</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/diagnosticport/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/processinfo/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient and system.diagnostics.process not supported</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/buffersize/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/reverseouter/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/processenvironment/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/pauseonstart/**">
<Issue>Could not load legacy Microsoft.Diagnostics.Tools.RuntimeClient</Issue>
</ExcludeList>
</ItemGroup>

<ItemGroup Condition=" $(TargetOS) == 'Android' " >
Expand Down Expand Up @@ -3562,14 +3609,11 @@
<ExcludeList Include = "$(XunitTestBinBase)/JIT/Performance/CodeQuality/SIMD/RayTracer/RayTracer/**">
<Issue>https://github.com/dotnet/runtime/issues/54906</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventactivityidcontrol/eventactivityidcontrol/**">
<Issue>https://github.com/dotnet/runtime/issues/52763</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/complus_config/name_config_with_pid/**">
<Issue>https://github.com/dotnet/runtime/issues/54974</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/eventsourceerror/**">
<Issue> needs triage </Issue>
<ExcludeList Include = "$(XunitTestBinBase)/tracing/eventpipe/**">
<Issue>Need to update with Microsoft.Diagnostics.NETCore.Client port https://github.com/dotnet/runtime/pull/64358</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/Interop/UnmanagedCallConv/UnmanagedCallConvTest/**">
<Issue>https://github.com/dotnet/runtime/issues/53077</Issue>
Expand Down
5 changes: 5 additions & 0 deletions src/tests/tracing/eventpipe/common/IpcUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,11 @@ public static Stream GetStandardTransport(int processId)
namedPipe.Connect(3);
return namedPipe;
}
else if (OperatingSystem.IsAndroid())
{
TcpClient client = new TcpClient("127.0.0.1", 9000);
return client.GetStream();
}
else
{
string ipcPort;
Expand Down

0 comments on commit 1c80769

Please sign in to comment.