@@ -82,8 +82,12 @@ export UNO_TESTS_LOCAL_TESTS_FILE=$BUILD_SOURCESDIRECTORY/src/SamplesApp/Samples
82
82
export UNO_UITEST_BENCHMARKS_PATH=$BUILD_ARTIFACTSTAGINGDIRECTORY /benchmarks/ios-automated
83
83
export UNO_UITEST_RUNTIMETESTS_RESULTS_FILE_PATH=$BUILD_SOURCESDIRECTORY /build/RuntimeTestResults-ios-automated.xml
84
84
85
- if [ $( wc -l < " $UNO_TESTS_FAILED_LIST " ) -eq 1 ];
86
- then
85
+ export UNO_UITEST_SIMULATOR_VERSION=" com.apple.CoreSimulator.SimRuntime.iOS-15-2"
86
+ export UNO_UITEST_SIMULATOR_NAME=" iPad Pro (12.9-inch) (4th generation)"
87
+
88
+ UITEST_IGNORE_RERUN_FILE=" ${UITEST_IGNORE_RERUN_FILE:= false} "
89
+
90
+ if [ $( wc -l < " $UNO_TESTS_FAILED_LIST " ) -eq 1 ] && [ " $UITEST_IGNORE_RERUN_FILE " != " true" ]; then
87
91
# The test results file only contains the re-run marker and no
88
92
# other test to rerun. We can skip this run.
89
93
echo " The file $UNO_TESTS_FAILED_LIST does not contain tests to re-run, skipping."
96
100
echo " Listing iOS simulators"
97
101
xcrun simctl list devices --json
98
102
99
- # # Preemptively start the simulator
100
- /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator &
103
+ # #
104
+ # # Pre-install the application to avoid https://github.com/microsoft/appcenter/issues/2389
105
+ # #
106
+ export SIMULATOR_ID=` xcrun simctl list -j | jq -r --arg sim " $UNO_UITEST_SIMULATOR_VERSION " --arg name " $UNO_UITEST_SIMULATOR_NAME " ' .devices[$sim] | .[] | select(.name==$name) | .udid' `
107
+
108
+ echo " Starting simulator: $SIMULATOR_ID ($UNO_UITEST_SIMULATOR_VERSION / $UNO_UITEST_SIMULATOR_NAME )"
109
+ xcrun simctl boot " $SIMULATOR_ID " || true
110
+
111
+ echo " Install app on simulator: $SIMULATOR_ID "
112
+ xcrun simctl install " $SIMULATOR_ID " " $UNO_UITEST_IOSBUNDLE_PATH " || true
101
113
102
114
# # Pre-build the transform tool to get early warnings
103
115
pushd $BUILD_SOURCESDIRECTORY /src/Uno.NUnitTransformTool
@@ -149,10 +161,17 @@ date
149
161
# export the simulator logs
150
162
export LOG_FILEPATH=$UNO_UITEST_SCREENSHOT_PATH /_logs
151
163
export TMP_LOG_FILEPATH=/tmp/DeviceLog-` date +" %Y%m%d%H%M%S" ` .logarchive
164
+ export LOG_FILEPATH_FULL=$LOG_FILEPATH /DeviceLog-$UITEST_AUTOMATED_GROUP -` date +" %Y%m%d%H%M%S" ` .txt
152
165
153
166
mkdir -p $LOG_FILEPATH
154
167
xcrun simctl spawn booted log collect --output $TMP_LOG_FILEPATH
155
- log show --style syslog $TMP_LOG_FILEPATH > $LOG_FILEPATH /DeviceLog-$UITEST_AUTOMATED_GROUP -` date +" %Y%m%d%H%M%S" ` .txt
168
+ log show --style syslog $TMP_LOG_FILEPATH > $LOG_FILEPATH_FULL
169
+
170
+ if grep -Fxq " mini-generic-sharing.c:899" $LOG_FILEPATH_FULL
171
+ then
172
+ # The application may crash without known cause, add a marker so the job can be restarted in that case.
173
+ echo " ##[error]mini-generic-sharing.c:899 assertion reached (https://github.com/unoplatform/uno/issues/8167)"
174
+ fi
156
175
157
176
if [ ! -f " $UNO_ORIGINAL_TEST_RESULTS " ]; then
158
177
echo " ERROR: The test results file $UNO_ORIGINAL_TEST_RESULTS does not exist (did nunit crash ?)"
0 commit comments