File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,17 @@ jobs:
234234
235235 cd -
236236
237- adb shell "cd /data/local/tmp/${STAGING} && ./${PACKAGE}PackageTests.xctest"
237+ TEST_CMD="./${PACKAGE}PackageTests.xctest"
238+ TEST_SHELL="cd /data/local/tmp/${STAGING}"
239+ TEST_SHELL="${TEST_SHELL} && ${TEST_CMD}"
240+
241+ # Run a second time with the Swift Testing library
242+ # We additionally need to handle the special exit code EXIT_NO_TESTS_FOUND (69 on Android),
243+ # which can happen when the tests link to Testing, but no tests are executed
244+ # see: https://github.com/swiftlang/swift-package-manager/blob/1b593469e8ad3daf2cc10e798340bd2de68c402d/Sources/Commands/SwiftTestCommand.swift#L1542
245+ TEST_SHELL="${TEST_SHELL} && ${TEST_CMD} --testing-library swift-testing && [ \$? -eq 0 ] || [ \$? -eq 69 ]"
246+
247+ adb shell "${TEST_SHELL}"
238248 EOF
239249
240250 chmod +x run-tests.sh
@@ -258,6 +268,8 @@ jobs:
258268 run : ./run-tests.sh apple/swift-system
259269
260270 - name : Run swift-crypto tests
271+ # references Tests/ file paths by absolute filename
272+ if : false
261273 run : ./run-tests.sh apple/swift-crypto
262274
263275 - name : Run swift-nio tests
You can’t perform that action at this time.
0 commit comments