[Test] BuildBasicApplicationAndAotProfileIt fails on macOS CI: aprofutil exits with code 127
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 252
Description
### Context
The `BuildBasicApplicationAndAotProfileIt` test in `tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs` is failing on macOS CI lanes with exit code 127 (`command not found`) from `aprofutil`:
```
/Users/runner/work/1/s/bin/Release/dotnet/packs/Microsoft.Android.Sdk.Darwin/37.0.0-ci.pr.gh11477.0/tools/Xamarin.Android.Application.targets(81,5): error MSB3073:
The command ""/Users/runner/.nuget/packages/mono.aotprofiler.android/9.0.0-preview1/tools/aprofutil" -s -v -p 9349 -o "custom.aprof"" exited with code 127.
```
### Suspected cause
Exit code 127 on Unix means the shell could not find / could not execute the binary. The `aprofutil` shipped in the `mono.aotprofiler.android` 9.0.0-preview1 NuGet is likely:
1. An x64 binary that no longer runs on the new `macOS-15` hosted images (Apple Silicon by default, Rosetta missing or behaving differently), **or**
2. A `Mono.Posix` / dylib dependency that is no longer present on macOS-15
The test was disabled in https://github.com/dotnet/android/pull/11477 so the rest of the suite can move forward. Re-enable once `aprofutil` is updated for macOS-15 / Apple Silicon.
### Repro
Run on macOS CI after https://github.com/dotnet/android/pull/11708 (macOS-15 hosted images bump):
```
./dotnet-local.sh test bin/TestRelease/MSBuildDeviceIntegration/net11.0/MSBuildDeviceIntegration.dll --filter Name=BuildBasicApplicationAndAotProfileIt
```
### What to do here
- [ ] Update `mono.aotprofiler.android` to a build whose `aprofutil` works on macOS-15
- [ ] Remove the `[Ignore]` attribute on `BuildBasicApplicationAndAotProfileIt`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs and the ignored BuildBasicApplicationAndAotProfileIt test. Run the provided dotnet-local.sh command on macOS CI, then inspect the mono.aotprofiler.android package and aprofutil on macOS-15. Done means aprofutil runs successfully, the package is updated as needed, the [Ignore] attribute is removed, and the test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, macos
- Domain
- build-system, ci-cd, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100