This repository was archived by the owner on Jun 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3+ realpath () {
4+ [[ $1 = /* ]] && echo " $1 " || echo " $PWD /${1# ./ } "
5+ }
6+
37XCODE_PATH=` xcode-select -print-path`
48TRACETEMPLATE=" /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate"
5- APP_LOCATION=$1
9+ APP_LOCATION=$( realpath " $1 " )
610DEVICE_ID=$2
711
812if [ ! $# -gt 1 ]; then
@@ -12,12 +16,6 @@ if [ ! $# -gt 1 ]; then
1216 exit -1
1317fi
1418
15- # If running on device, only need name of app, full path not important
16- if [ ! " $DEVICE_ID " = " " ]; then
17- RUN_ON_SPECIFIC_DEVICE_OPTION=" $DEVICE_ID "
18- APP_LOCATION=` basename $APP_LOCATION `
19- fi
20-
2119# Create junit reporting directory
2220if [ ! -d " test-reports" ]; then
2321 mkdir test-reports
@@ -28,17 +26,17 @@ for script in specs/*
2826do
2927 if [[ -f $script ]]; then
3028 echo $script
31- instruments -w " $RUN_ON_SPECIFIC_DEVICE_OPTION " \
29+ instruments -w " $DEVICE_ID " \
3230 -t $TRACETEMPLATE \
3331 $APP_LOCATION \
3432 -e UIASCRIPT $script \
3533 -e UIARESULTSPATH /var/tmp | grep " <" > test-reports/test-results.xml
34+
35+ # cleanup the tracefiles produced from instruments
36+ rm -rf * .trace
3637 fi
3738done
3839
39- # cleanup the tracefiles produced from instruments
40- rm -rf * .trace
41-
4240# fail script if any failures have been generated
4341if [ ` grep " <failure>" test-reports/test-results.xml | wc -l` -gt 0 ]; then
4442 echo ' Build Failed'
You can’t perform that action at this time.
0 commit comments