-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathJenkinsTestingBash.sh
56 lines (51 loc) · 1.33 KB
/
JenkinsTestingBash.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
POSITIONAL=()
while [[ $# -gt 0 ]]; do
key="$1"
case ${key} in
-rumid)
APP_ID="$2"
shift # past argument
shift # past value
;;
-url)
ACCESS_SERVER_URL="$2"
shift # past argument
shift # past value
;;
-trackid)
TRACK_ID="$2"
shift # past argument
shift # past value
;;
-traceurl)
TRACE_URL="$2"
shift # past argument
shift # past value
;;
-devicedestination)
DEVICE_DESTINATION="$2"
shift # past argument
shift # past value
;;
--default)
DEFAULT=YES
shift # past argument
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parametersCERT_FILE
cd "Examples/Examples.xcodeproj/xcshareddata/xcschemes/"
sed -i '' 's/$APP_ID/'"$APP_ID"'/g' FTMobileSDKUnitTestsForCmd.xcscheme
sed -i '' 's~$ACCESS_SERVER_URL~'"$ACCESS_SERVER_URL"'~' FTMobileSDKUnitTestsForCmd.xcscheme
sed -i '' 's/$TRACK_ID/'"$TRACK_ID"'/g' FTMobileSDKUnitTestsForCmd.xcscheme
sed -i '' 's~$TRACE_URL~'"$TRACE_URL"'~' FTMobileSDKUnitTestsForCmd.xcscheme
cd ../../../..
pod install
xcodebuild test -workspace FTMobileSDK.xcworkspace \
-scheme FTMobileSDKUnitTestsForCmd \
-only-testing FTMobileSDKUnitTests \
-destination "$DEVICE_DESTINATION"