Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests][mobile] Enable diagnostic_tracing for mobile runtime tests #60879

Merged
merged 7 commits into from
Feb 10, 2022
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 @@ -3394,6 +3394,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 @@ -3559,14 +3606,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