Skip to content

Commit

Permalink
Add Carthage & Quick & Nimble for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinejr committed May 5, 2018
1 parent 2b9e347 commit f7a2f24
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -20,4 +20,4 @@ xcuserdata/
/.build/
/www

/Carthage/Build
/Carthage
2 changes: 2 additions & 0 deletions Cartfile.private
@@ -0,0 +1,2 @@
github "Quick/Quick" ~> 1.1.0
github "Quick/Nimble" ~> 7.0.0
2 changes: 2 additions & 0 deletions Cartfile.resolved
@@ -0,0 +1,2 @@
github "Quick/Nimble" "v7.1.1"
github "Quick/Quick" "v1.3.0"
2 changes: 1 addition & 1 deletion FrameworkSpec
Expand Up @@ -15,7 +15,7 @@ swifty_user_defaults_tests = new_target do |target|
target.include_files = ["Tests/**/*.swift"]
target.exclude_files = []
target.resource_files = ["Tests/**/*.png"]
target.dependencies = []
target.dependencies = ["Quick", "Nimble"]
target.type = :unit_test_bundle
target.enable_code_coverage = true
end
Expand Down
24 changes: 24 additions & 0 deletions scripts/copy-carthage-frameworks.sh
@@ -0,0 +1,24 @@
#!/bin/sh

case "$PLATFORM_NAME" in
macosx) plat=Mac;;
iphone*) plat=iOS;;
watch*) plat=watchOS;;
appletv*) plat=tvOS;;
*) echo "error: Unknown PLATFORM_NAME: $PLATFORM_NAME"; exit 1;;
esac

for (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do
VAR=SCRIPT_INPUT_FILE_$n
framework=$(basename "${!VAR}")
export SCRIPT_INPUT_FILE_$n="$SRCROOT"/Carthage/Build/$plat/"$framework"
done

/usr/local/bin/carthage copy-frameworks || exit

for (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do
VAR=SCRIPT_INPUT_FILE_$n
source=${!VAR}.dSYM
dest=${BUILT_PRODUCTS_DIR}/$(basename "$source")
ditto "$source" "$dest" || exit
done

0 comments on commit f7a2f24

Please sign in to comment.