File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -375,7 +375,11 @@ runs:
375
375
# see https://github.com/swiftlang/swift-package-manager/issues/8362#issuecomment-2719116854
376
376
# but only do it when the command links to the Testing library, otherwise it will fail with the error:
377
377
# Error: Invalid option "--testing-library"
378
- patchelf --print-needed ${XCTEST} | grep libTesting.so && TEST_SHELL="${TEST_SHELL} && ${TEST_CMD} --testing-library swift-testing" || true
378
+ #
379
+ # We additionally need to handle the special exit code EXIT_NO_TESTS_FOUND (69 on Android),
380
+ # which can happen when the tests link to Testing, but no tests are executed
381
+ # see: https://github.com/swiftlang/swift-package-manager/blob/1b593469e8ad3daf2cc10e798340bd2de68c402d/Sources/Commands/SwiftTestCommand.swift#L1542
382
+ patchelf --print-needed ${XCTEST} | grep libTesting.so && TEST_SHELL="${TEST_SHELL} && ${TEST_CMD} --testing-library swift-testing && [ $? -eq 0 ] || [ $? -eq 69 ]" || true
379
383
fi
380
384
echo "adb shell '${TEST_SHELL}'" >> ${SCRIPT_FILE}
381
385
done
You can’t perform that action at this time.
0 commit comments