@@ -53,6 +53,8 @@ on run argv
53
53
set unixPathToApplication to (the POSIX path of (appFolderName as alias ))
54
54
55
55
logEvent(" Unix Path: " & unixPathToApplication)
56
+
57
+ set errorLog to " "
56
58
57
59
repeat with currentDevice in allDevices
58
60
changeDevice(currentDevice)
@@ -63,9 +65,9 @@ on run argv
63
65
64
66
set currentResults to do shell script automationTemplate & " \" " & unixPathToApplication & " \" -e UIASCRIPT \" " & scriptName & " \" -e UIARESULTSPATH Results"
65
67
66
- -- TODO: get results and maybe show error message
67
- -- Success response: Pass: xy
68
- -- Error response: Fail: xy
68
+ if (currentResults as string ) contains " Fail: " then
69
+ set errorLog to (errorLog & currentResults)
70
+ end if
69
71
70
72
71
73
logEvent(currentResults)
@@ -82,6 +84,11 @@ on run argv
82
84
end repeat
83
85
84
86
do shell script " rm -rf ./instrumentscli*"
87
+
88
+ if length of errorLog > 10 then
89
+ logEvent(" Some errors occurred: " & errorLog)
90
+ do shell script " echo '" & errorLog & " ' > Latest/errorLog.txt"
91
+ end if
85
92
end run
86
93
87
94
@@ -107,7 +114,7 @@ on setupFolders()
107
114
do shell script " mkdir Results/Build-" & (do shell script " date +'%Y.%m.%d-%H:%M:%S'" as string )
108
115
109
116
-- Create the link to the latest build
110
- do shell script " rm -rf Latest"
117
+ do shell script " rm Latest"
111
118
do shell script " ln -s Results/Build-" & (do shell script " date +'%Y.%m.%d-%H:%M:%S'" as string ) & " Latest"
112
119
try
113
120
do shell script " mv Results/Run* Results/Build-" & (do shell script " date +'%Y.%m.%d-%H:%M:%S'" as string ) & " /"
0 commit comments