forked from bitbar/test-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-tests-ios.sh
More file actions
executable file
·40 lines (30 loc) · 907 Bytes
/
Copy pathrun-tests-ios.sh
File metadata and controls
executable file
·40 lines (30 loc) · 907 Bytes
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
#!/bin/bash
export JAVA_HOME=$(/usr/libexec/java_home)
export APPIUM_PORT=${APPIUM_PORT:="4723"}
if [ -z ${UDID} ] ; then
export UDID=${IOS_UDID}
fi
echo "UDID is ${UDID}"
echo "Extracting tests.zip..."
unzip -o tests.zip
echo "Installing requirements"
chmod 0755 resources/requirements.txt
python3 -m pip install --user --requirement resources/requirements.txt
# Create the screenshots directory, if it doesn't exist'
mkdir -p screenshots
echo "Starting Appium ..."
appium --log-no-colors --log-timestamp
ps -ef|grep appium
export APPFILE="$PWD/application.ipa"
## Start test execution
echo "Running test"
if [ -n "${APPFILE}" ]; then
python3 run_ios.py --variable "APPFILE:${APPFILE}" -x TEST-all
else
python3 run_ios.py -x TEST-all
fi
echo "Gathering results"
mkdir -p output-files
cp -r screenshots output-files
mv report.html log.html output-files
zip -r output-files.zip output-files