Android testing is broken with swiftbuild
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Inizia da .github/workflows/scripts/android/android-emulator-tests.sh alle righe collegate e verifica come viene selezionabile ed eseguito l'eseguibile dei test Android. Confronta l'output di swiftbuild in .build/out/Products/Debug-android con il layout nativo, inclusi i modi XCTest e Swift Testing. È completato quando ogni runner della destinazione di test viene eseguito e il workflow fallisce quando un singolo risultato non ha esito positivo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In https://github.com/swiftlang/github-workflows/pull/269, the Android build script dropped the --build-system native flag, so we will use whatever the default is for the current toolchain (which, as of 6.4, is 'swiftbuild'). That PR rightly handles the fact that the native build created test executables with the .xctest suffix, but the new swiftbuild created the binaries ending with -test-runner (as discussed at https://github.com/swiftlang/swift-package-manager/issues/9673):
However, it doesn't take into account the fact that while native created a single monolithic test executable, swiftbuild appears to create a separate executable for each test target (@owenv confirm?)
For example, for the swift-numerics package:
native: .build/aarch64-unknown-linux-android28/debug/swift-numericsPackageTests.xctest
swiftbuild: .build/out/Products/Debug-android/ComplexTests-test-runner, .build/out/Products/Debug-android/RealTests-test-runner, .build/out/Products/Debug-android/IntegerUtilitiesTests-test-runner
This means that even if the test is being executed at all, it is likely only executing one of them. This may explain why swift-algorithms testing is passing with 6.3 Android, but failing with nightly-main Android.
Unless there is some hidden way to run all the tests as a single batch, I suspect that we'll need to have the action create a little script that executes each of the test executables, remembers the process result for each of them, and then passes/fails based on whether all of the individual tests passed. Something like:
# Run each of the test binaries, both in XCTest mode and Swift Testing mode
.build/out/Products/Debug-android/ComplexTests-test-runner; echo $? >> results.txt
.build/out/Products/Debug-android/ComplexTests-test-runner --testing-library xctest; echo $? >> results.txt
.build/out/Products/Debug-android/RealTests-test-runner; echo $? >> results.txt
.build/out/Products/Debug-android/RealTests-test-runner --testing-library xctest; echo $? >> results.txt
.build/out/Products/Debug-android/IntegerUtilitiesTests-test-runner; echo $? >> results.txt
.build/out/Products/Debug-android/IntegerUtilitiesTests-test-runner --testing-library xctest; echo $? >> results.txt
# grep for any non-0 non-69 values in results.txt and fail if any are found…
CC @swiftlang/android-workgroup as discussed at the workgroup meeting today
CC @dschaefer in case this is of interest for packaging and tooling (https://github.com/swiftlang/swift-package-manager/issues/9940#issuecomment-4361950153)
- Lingua principale
- Swift
- Stelle
- 115
- Fork
- 57
- Merge medio
- 1g 8h
- PR unite (30g)
- 3
Guida per i contributori
Apri 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 swiftlang/github-workflows
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
swiftlang/github-workflows#305 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
swiftlang/github-workflows#261 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
swiftlang/github-workflows#258 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
swiftlang/github-workflows#312 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
swiftlang/github-workflows#267 ·
Tutte le issue di swiftlang/github-workflows
Issue simili
-
tvOS
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
skiptools/skip-fuse-ui#147 ·
-
area:collectors P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
catehstn/social-brain-app#183 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100