Support command-line arguments and XCTest filters without forcing xcodebuild in ios_xctestrun_runner
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- build-system, testing
Direzione di ricerca
Start by locating ios_xctestrun_runner and comparing the direct xctest and xcodebuild test-without-building branches. Check how command_line_args and test filters are parsed, then find the runner tests that cover backend selection. Done means representable arguments and XCTest selections use direct execution while cases it cannot handle still select xcodebuild; add or update tests for both paths.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Allow hostless iOS simulator XCTest bundles to continue using direct xctest execution when supplying command-line arguments or test selections that xctest can handle.
Currently, ios_xctestrun_runner switches to xcodebuild test-without-building whenever command_line_args or a test filter is supplied. The direct execution branch always invokes:
xcrun simctl spawn <simulator-udid> <xctest-binary> \
-XCTest All <test-bundle>
However, direct xctest execution supports useful arguments and test selection, so these inputs do not always require switching execution backends.
Use cases
1. Language, locale, and text-direction overrides
-AppleLanguages '(en_GB)' -AppleLocale en_US -AppleTextDirection NO
Apple documents these launch arguments in Testing Your Internationalized App, alongside arguments for testing right-to-left layouts, double-length localized strings, and detecting non-localized strings.
Passing preferences per invocation avoids changing persistent simulator preferences.
2. Custom test configuration
Test code or its dependencies may read startup arguments through CommandLine.arguments, ProcessInfo, or argument-domain preferences-for example, to select fixtures or enable test-specific behavior.
3. Running selected XCTest classes or methods
The documented xctest -XCTest option supports class and method identifiers, including comma-separated selections. Running one test, one class, or several selected tests should be able to retain direct execution where the selection is representable.
These cases are particularly useful for short hostless test bundles, where switching to xcodebuild introduces additional startup and orchestration work.
Example
Given an otherwise directly executable hostless XCTest target:
bazel test //tests:ExampleTests \
--test_arg="--command_line_args=-AppleLanguages,(en_GB),-AppleLocale,en_US"
Or:
bazel test //tests:ExampleTests \
--test_filter=ExampleTests/testExample
Both currently select xcodebuild, even when no other requested feature requires it.
- Lingua principale
- Starlark
- Stelle
- 600
- Fork
- 354
- Merge medio
- 2g 7h
- PR unite (30g)
- 8
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bazelbuild/rules_apple
-
`ios_xctestrun_runner` skips the simulator cleanup action on early exits and signalsForse già presa @katre l’ha presa 3 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
bazelbuild/rules_apple#3163 ·
I maintainer di solito rispondono entro 1 giorno
-
register_binary_linking_action links with the GCC coverage map format under coverageForse già presa @TrapsterDK l’ha presa 7 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
bazelbuild/rules_apple#3160 ·
I maintainer di solito rispondono entro 1 giorno
-
Registered toolchains load //apple/internal and its dependencies in every buildForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
bazelbuild/rules_apple#3158 ·
I maintainer di solito rispondono entro 1 giorno
-
Simulator cleanup is skipped when the post-action failsForse già presa @vakhidbetrakhmadov l’ha presa 15 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
bazelbuild/rules_apple#3147 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
bazelbuild/rules_apple#3139 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di bazelbuild/rules_apple
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
avaje/avaje-metrics#142 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bazelbuild/apple_support#707 ·
I maintainer di solito rispondono entro 1 giorno
-
Security gate is red on mainApertasecurity
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nimbus-agent/Nimbus#2319 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
nextjournal/clerk#830 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100