-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
!#/bin/bash | ||
|
||
set -eux -o pipefail | ||
|
||
echo Dumping package information | ||
swift package describe --type json > package.json | ||
cat package.json | ||
|
||
echo Extracting test schemes | ||
cat package.json | jq -r '.targets[] | select(.type == "test") | .name' > test_schemes.txt | ||
cat test_schemes.txt | ||
|
||
echo loading vars | ||
ALL_TEST_SCHEMES=$(cat test_schemes.txt) | ||
echo $ALL_TEST_SCHEMES | ||
|
||
echo loading ios | ||
which grep | ||
grep --version | ||
grep foo test_schemes.txt || true | ||
grep Reactive test_schemes.txt || true | ||
grep -v Macro test_schemes.txt || true | ||
|
||
echo now into the var | ||
IOS_TEST_SCHEMES=$(grep -v Macro test_schemes.txt || true) | ||
echo done | ||
|
||
# Macros are only built for the compiler platform, so we cannot run macro tests on iOS. | ||
for TEST_SCHEME in $IOS_TEST_SCHEMES; do | ||
xcodebuild \ | ||
-scheme $TEST_SCHEME \ | ||
-destination "$IOS_DESTINATION" \ | ||
-skipMacroValidation \ | ||
test | ||
done | ||
|
||
# On macOS we can run all tests, including macro tests. | ||
for TEST_SCHEME in $ALL_TEST_SCHEMES; do | ||
xcodebuild \ | ||
-scheme $TEST_SCHEME \ | ||
-destination "platform=macOS" \ | ||
-skipMacroValidation \ | ||
test | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters