1 #!/bin/bash 2 3 # Copyright 2013 The Android Open Source Project 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 # The tests exercised in this file all assert/exit on failure, and terminate 18 # cleanly on success. The device is rebooted for each test, to ensure that 19 # a problem in one test doesn't propagate into subsequent tests. 20 21 rm -rf out 22 mkdir -p out 23 cd out 24 25 testcount=0 26 failcount=0 27 28 for T in \ 29 test_3a.py \ 30 test_black_white.py \ 31 test_camera_properties.py \ 32 test_capture_result.py \ 33 test_exposure.py \ 34 test_formats.py \ 35 test_jpeg.py \ 36 test_param_color_correction.py \ 37 test_param_exposure_time.py \ 38 test_param_noise_reduction.py \ 39 test_param_sensitivity.py \ 40 test_param_tonemap_mode.py \ 41 \ 42 test_latching.py \ 43 test_linearity.py \ 44 test_param_edge_mode.py \ 45 test_param_flash_mode.py \ 46 test_predicted_wb.py \ 47 48 do 49 let testcount=testcount+1 50 echo "" 51 echo "--------------------------------------------------------------------" 52 echo "Running test: $T" 53 echo "--------------------------------------------------------------------" 54 python ../"$T" reboot 55 code=$? 56 if [ $code -ne 0 ]; then 57 let failcount=failcount+1 58 echo "" 59 echo "###############" 60 echo "# Test failed #" 61 echo "###############" 62 fi 63 echo "" 64 done 65 66 echo "" 67 echo "$failcount out of $testcount tests failed" 68 echo "" 69 70 cd .. 71 72