Lines Matching +full:- +full:- +full:error +full:- +full:exitcode
9 # http://www.apache.org/licenses/LICENSE-2.0
22 echo Running test script: build-android/test_APK.sh
31 echo " -p|--platform <platform> (optional)"
32 echo " -f|--filter <gtest filter list> (optional)"
33 echo " -s|--serial <target device serial number> (optional)"
34 echo " -a|--abi <target abi> (optional)"
36 echo "i.e. ${0##*/} -p <platform> -f <test filter> -s <serial number>"
40 if [[ $(($# % 2)) -ne 0 ]]
49 while [[ $# -gt 0 ]]
52 -p|--platform)
56 -f|--filter)
60 -s|--serial)
64 -a|--abi)
68 -*)
79 serialFlag="-s $serial"
88 echo Using device $(adb get-serialno)
91 if [[ -z $platform ]]
97 if [[ -z $filter ]]
108 set -e
133 if [ $(date +%s) -gt $lock_end_time ]
137 rm -r /var/tmp/VkLayerValidationTests.$serial.lock
143 rm -r /var/tmp/VkLayerValidationTests.$serial.lock
148 adb $serialFlag logcat -c
151 adb $serialFlag shell am force-stop com.example.VulkanLayerValidationTests
154 # Disable exit on error in case the APK is not present
157 if [ $? -eq 0 ]
161 # Re-enable exit on error
162 set -e
168 if [[ -z $abi ]]
170 adb $serialFlag install -r bin/VulkanLayerValidationTests.apk
172 adb $serialFlag install --abi $abi -r bin/VulkanLayerValidationTests.apk
179 …art -a android.intent.action.MAIN -c android-intent.category.LAUNCH -n com.example.VulkanLayerVali…
189 exitCode=-1;
191 # Disable exit on error, we expect grep to fail multiple times in this loop
194 while [ $(date +%s) -lt $endTime ]; do # Loop until interval has elapsed.
197 adb $serialFlag logcat -d | grep "==== Tests PASSED ===="
198 if [ $? -eq 0 ]
203 exitCode=0
208 adb $serialFlag logcat -d | grep "==== Tests FAILED ===="
209 if [ $? -eq 0 ]
214 exitCode=1
219 …adb $serialFlag logcat -d | grep "\*\*\* \*\*\* \*\*\* \*\*\* \*\*\* \*\*\* \*\*\* \*\*\* \*\*\* \…
220 if [ $? -eq 0 ]
222 exitCode=2
233 # Re-enable exit on error
234 set -e
236 if [ $exitCode -eq -1 ]
245 # Return to home screen to clear any error pop-ups
249 adb $serialFlag shell am force-stop com.example.VulkanLayerValidationTests
256 today=$(date +%Y%m%d-%H%M%S)
262 adb $serialFlag logcat -d | grep VulkanLayerValidationTests > $logFile
264 if [ -f $outFile ]; then
265 echo $outFile size $(wc -c < $outFile)
268 if [ -f $errFile ]; then
269 echo $errFile size $(wc -c < $errFile)
272 if [ -f $logFile ]; then
273 echo $logFile size $(wc -c < $logFile)
276 if [ $exitCode -ne 0 ]
291 exit $exitCode