Simulator cleanup is skipped when the post-action fails

Aperta
#3,147 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@vakhidbetrakhmadov ci sta già lavorando.

Dal 20/11/2026.

  • #20 di @vakhidbetrakhmadov — integrata
  • #3148 di @vakhidbetrakhmadov — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
ios
Ambito
build-system

Direzione di ricerca

Start at ios_xctestrun_runner and trace where post_action_determines_exit_code is handled relative to clean_up_simulator_action; the bug is the ordering on the post-action failure exit path. Run the supplied reproducer with an installed simulator runtime and use the CLEANUP_CALLED marker to confirm cleanup runs before the runner exits with 1. Done means the Bazel target still fails but cleanup output appears.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Reproducer: rules-apple-post-action-cleanup-repro.zip

ios_xctestrun_runner exits before clean_up_simulator_action when post_action_determines_exit_code = True and post_action fails.

The reproducer project pins upstream main at 730e4337bd3aa21cb01009205cf7320a548df5ac.
It contains one passing XCTest, a post-action that exits with 1, and a cleanup hook that prints CLEANUP_CALLED.

On an Apple silicon Mac with Xcode and an iOS simulator runtime installed:

bazelisk test //repro:Tests --ios_multi_cpus=sim_arm64 \
  --@rules_apple//apple/build_settings:ios_simulator_version=27.0 \
  --test_output=all --nocache_test_results

Use an installed iOS version for ios_simulator_version.

Actual: XCTest passes, the runner reports post_action exited with '1', and CLEANUP_CALLED is missing.

Expected: cleanup prints CLEANUP_CALLED before the runner exits with 1.

The Bazel target should fail in both cases.

Lingua principale
Starlark
Stelle
600
Fork
354
Merge medio
2g 7h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bazelbuild/rules_apple

Tutte le issue di bazelbuild/rules_apple

Issue simili

Altre issue su Build System

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.