From 9615995da440156c1a0c6759179d046314678029 Mon Sep 17 00:00:00 2001 From: Yin-Chia Yeh Date: Tue, 14 Oct 2014 17:18:36 -0700 Subject: Camera2 ITS: add proper capability gating Skip tests if corresponding capability is not supported. Bug: 17994909 Change-Id: I48fcd2a766f62a44e3cdb933006ca9e6f9350ad3 --- apps/CameraITS/tests/scene1/test_black_white.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/CameraITS/tests/scene1/test_black_white.py') diff --git a/apps/CameraITS/tests/scene1/test_black_white.py b/apps/CameraITS/tests/scene1/test_black_white.py index ee7fb47..e471602 100644 --- a/apps/CameraITS/tests/scene1/test_black_white.py +++ b/apps/CameraITS/tests/scene1/test_black_white.py @@ -13,13 +13,9 @@ # limitations under the License. import its.image +import its.caps import its.device import its.objects -import sys -import numpy -import Image -import pprint -import math import pylab import os.path import matplotlib @@ -36,6 +32,10 @@ def main(): with its.device.ItsSession() as cam: props = cam.get_camera_properties() + if not its.caps.manual_sensor(props): + print "Test skipped" + return + expt_range = props['android.sensor.info.exposureTimeRange'] sens_range = props['android.sensor.info.sensitivityRange'] -- cgit v1.2.3