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
3 changes: 0 additions & 3 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3559,9 +3559,6 @@
<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>
Expand Down
6 changes: 6 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,12 @@ public static Stream GetStandardTransport(int processId)
namedPipe.Connect(3);
return namedPipe;
}
else if (OperatingSystem.IsAndroid())
{
Int32 port = 9000;
TcpClient client = new TcpClient("127.0.0.1", port);
return client.GetStream();
}
else
{
string ipcPort;
Expand Down