Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ jobs:
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }}
platforms:
# Keep the diagnostic run scoped to the dedicated runtime-ioslike pipeline.
- ${{ if eq(parameters.isiOSLikeOnlyBuild, true) }}:
- ios_arm64
# Tracking issue: https://github.com/dotnet/runtime/issues/123796
# - ios_arm64
# - tvos_arm64
variables:
# map dependencies variables to local variables
Expand Down
9 changes: 9 additions & 0 deletions eng/testing/tests.ioslike.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@
</PropertyGroup>

<PropertyGroup Condition="'$(BuildTestsOnHelix)' == 'true'">
<!-- Log Rosetta state before invoking the x64 Helix dotnet-cli on Apple device hosts. -->
<_RosettaDiagnosticsCommand Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvos'">echo "=== Rosetta diagnostics ==="; uname -m; </_RosettaDiagnosticsCommand>
<_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) PROC_TRANSLATED=`/usr/sbin/sysctl -n sysctl.proc_translated 2&gt;/dev/null || true`; if [ -n "$PROC_TRANSLATED" ]; then echo "proc_translated=$PROC_TRANSLATED"; else echo "proc_translated=unavailable"; fi; </_RosettaDiagnosticsCommand>
<_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if /usr/sbin/pkgutil --pkg-info com.apple.pkg.RosettaUpdateAuto 2&gt;/dev/null; then echo "rosetta_receipt=present"; else echo "rosetta_receipt=missing"; fi; </_RosettaDiagnosticsCommand>
<_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if [ -e /Library/Apple/usr/libexec/oah/libRosettaRuntime ]; then echo "rosetta_runtime=present"; else echo "rosetta_runtime=missing"; fi; </_RosettaDiagnosticsCommand>
<_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if /usr/bin/arch -x86_64 /usr/bin/true &gt;/dev/null 2&gt;&amp;1; then echo "x64_exec_works=true"; else echo "x64_exec_works=false"; fi; echo "DOTNET_ROOT=$DOTNET_ROOT"; </_RosettaDiagnosticsCommand>
<_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if [ -n "$DOTNET_ROOT" ] &amp;&amp; [ -e "$DOTNET_ROOT/dotnet" ]; then echo "dotnet_host=$DOTNET_ROOT/dotnet"; /usr/bin/file "$DOTNET_ROOT/dotnet" || true; else echo "dotnet_host=missing"; fi; echo "=== End Rosetta diagnostics ===" </_RosettaDiagnosticsCommand>

<_AOTBuildCommand>export PATH=$HELIX_CORRELATION_PAYLOAD/build/cmake/cmake-3.28.0-macos-universal/CMake.app/Contents/bin:$PATH &amp;&amp; </_AOTBuildCommand>
<_AOTBuildCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_AOTBuildCommand) $(_RosettaDiagnosticsCommand) &amp;&amp; </_AOTBuildCommand>
Comment on lines +18 to +22
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The assembled shell command can become syntactically invalid: _RosettaDiagnosticsCommand ends its last statement with a trailing ; (and earlier fragments also end with ;), but _AOTBuildCommand appends && after the diagnostics. That produces ...; && dotnet msbuild ..., which sh treats as a syntax error and will fail the workitem before the build.

Consider removing the trailing ; from the final diagnostics fragment (and/or ensure the diagnostics string ends with a real command like true), or avoid appending && after the diagnostics and instead have the diagnostics expression itself return success in a way that composes cleanly with &&.

Copilot uses AI. Check for mistakes.
<_AOTBuildCommand>$(_AOTBuildCommand) dotnet msbuild publish/ProxyProjectForAOTOnHelix.proj /bl:$XHARNESS_OUT/AOTBuild.binlog</_AOTBuildCommand>

<!-- running aot-helix tests locally, so we can test with the same project file as CI -->
Expand Down
Loading