regress.sh revision 87df78b48064a9bd31083968476e10242807985f
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 21rm -rf out 22mkdir -p out 23cd out 24 25testcount=0 26failcount=0 27 28for 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 46do 47 let testcount=testcount+1 48 echo "" 49 echo "--------------------------------------------------------------------" 50 echo "Running test: $T" 51 echo "--------------------------------------------------------------------" 52 python ../"$T" reboot 53 code=$? 54 if [ $code -ne 0 ]; then 55 let failcount=failcount+1 56 echo "" 57 echo "###############" 58 echo "# Test failed #" 59 echo "###############" 60 fi 61 echo "" 62done 63 64echo "" 65echo "$failcount out of $testcount tests failed" 66echo "" 67 68cd .. 69 70