diff options
author | Yin-Chia Yeh <yinchiayeh@google.com> | 2014-10-14 17:18:36 -0700 |
---|---|---|
committer | Yin-Chia Yeh <yinchiayeh@google.com> | 2014-10-15 13:10:37 -0700 |
commit | 9615995da440156c1a0c6759179d046314678029 (patch) | |
tree | f013b9a9f148aa46ef4103d22ef05c440803258b /apps/CameraITS/tests/scene1/test_jpeg.py | |
parent | 2760cd5bc10f76cab96bd3fe7525bda6ed9328e9 (diff) | |
download | pdk-9615995da440156c1a0c6759179d046314678029.tar.gz |
Camera2 ITS: add proper capability gating
Skip tests if corresponding capability is not supported.
Bug: 17994909
Change-Id: I48fcd2a766f62a44e3cdb933006ca9e6f9350ad3
Diffstat (limited to 'apps/CameraITS/tests/scene1/test_jpeg.py')
-rw-r--r-- | apps/CameraITS/tests/scene1/test_jpeg.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/CameraITS/tests/scene1/test_jpeg.py b/apps/CameraITS/tests/scene1/test_jpeg.py index 54a6189..bc2d64e 100644 --- a/apps/CameraITS/tests/scene1/test_jpeg.py +++ b/apps/CameraITS/tests/scene1/test_jpeg.py @@ -13,13 +13,11 @@ # limitations under the License. import its.image +import its.caps import its.device import its.objects import its.target import os.path -import Image -import shutil -import numpy import math def main(): @@ -31,6 +29,9 @@ def main(): with its.device.ItsSession() as cam: props = cam.get_camera_properties() + if not its.caps.compute_target_exposure(props): + print "Test skipped" + return e, s = its.target.get_target_exposure_combos(cam)["midExposureTime"] req = its.objects.manual_capture_request(s, e, True) |