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/scene0/test_capture_result_dump.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/scene0/test_capture_result_dump.py')
-rw-r--r-- | apps/CameraITS/tests/scene0/test_capture_result_dump.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/CameraITS/tests/scene0/test_capture_result_dump.py b/apps/CameraITS/tests/scene0/test_capture_result_dump.py index 4fd5d4a..c8b1f8f 100644 --- a/apps/CameraITS/tests/scene0/test_capture_result_dump.py +++ b/apps/CameraITS/tests/scene0/test_capture_result_dump.py @@ -12,24 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. +import its.caps import its.image import its.device import its.objects import its.target -import os.path import pprint def main(): """Test that a capture result is returned from a manual capture; dump it. """ - NAME = os.path.basename(__file__).split(".")[0] with its.device.ItsSession() as cam: # Arbitrary capture request exposure values; image content is not # important for this test, only the metadata. props = cam.get_camera_properties() + if not its.caps.manual_sensor(props): + print "Test skipped" + return + req,fmt = its.objects.get_fastest_manual_capture_settings(props) - req["android.statistics.lensShadingMapMode"] = 1 cap = cam.do_capture(req, fmt) pprint.pprint(cap["metadata"]) |