am edcfe23a: Merge changes Ib687cb8d,Iaa97a529 into lmp-sprout-dev
* commit 'edcfe23aa13575f6a22d903636edd70f0c87cd58':
CameraITS: adjust lockedBurst test settings
CameraITS: Marking known failures for ITS
diff --git a/apps/CameraITS/tests/scene1/test_locked_burst.py b/apps/CameraITS/tests/scene1/test_locked_burst.py
index 83cfa25..5cea30c 100644
--- a/apps/CameraITS/tests/scene1/test_locked_burst.py
+++ b/apps/CameraITS/tests/scene1/test_locked_burst.py
@@ -30,7 +30,7 @@
"""
NAME = os.path.basename(__file__).split(".")[0]
- BURST_LEN = 10
+ BURST_LEN = 8
SPREAD_THRESH = 0.005
FPS_MAX_DIFF = 2.0
@@ -38,7 +38,7 @@
props = cam.get_camera_properties()
# Converge 3A prior to capture.
- cam.do_3a(do_af=False, lock_ae=True, lock_awb=True)
+ cam.do_3a(do_af=True, lock_ae=True, lock_awb=True)
# After 3A has converged, lock AE+AWB for the duration of the test.
req = its.objects.auto_capture_request()
@@ -63,7 +63,8 @@
# Pass/fail based on center patch similarity.
for means in [r_means, g_means, b_means]:
spread = max(means) - min(means)
- print "Patch mean spread", spread
+ print "Patch mean spread", spread, \
+ " (min/max: ", min(means), "/", max(means), ")"
assert(spread < SPREAD_THRESH)
# Also ensure that the burst was at full frame rate.
@@ -80,9 +81,11 @@
tstamps = [c['metadata']['android.sensor.timestamp'] for c in caps]
deltas = [tstamps[i]-tstamps[i-1] for i in range(1,len(tstamps))]
actual_fps = 1.0 / (max(deltas) / 1000000000.0)
+ actual_fps_max = 1.0 / (min(deltas) / 1000000000.0)
max_fps = 1.0 / (min_duration / 1000000000.0)
+ print "Measure FPS min/max", actual_fps, "/", actual_fps_max
print "FPS measured %.1f, max advertized %.1f" %(actual_fps, max_fps)
- assert(max_fps - FPS_MAX_DIFF <= actual_fps <= max_fps)
+ assert(max_fps - FPS_MAX_DIFF <= actual_fps <= max_fps + FPS_MAX_DIFF)
if __name__ == '__main__':
main()
diff --git a/apps/CameraITS/tools/run_all_tests.py b/apps/CameraITS/tools/run_all_tests.py
index 2e1657c..6a57943 100644
--- a/apps/CameraITS/tools/run_all_tests.py
+++ b/apps/CameraITS/tools/run_all_tests.py
@@ -27,6 +27,27 @@
Script should be run from the top-level CameraITS directory.
"""
+ # Not yet mandated tests
+ NOT_YET_MANDATED = {
+ "scene0":[
+ "test_jitter"
+ ],
+ "scene1":[
+ "test_ae_precapture_trigger",
+ "test_black_white",
+ "test_burst_sameness_manual",
+ "test_crop_region_raw",
+ "test_crop_regions",
+ "test_exposure",
+ "test_locked_burst",
+ "test_param_exposure_time",
+ "test_param_flash_mode",
+ "test_yuv_plus_jpeg",
+ "test_yuv_plus_raw",
+ "test_yuv_plus_raw10"
+ ]
+ }
+
# Get all the scene0 and scene1 tests, which can be run using the same
# physical setup.
scenes = ["scene0", "scene1"]
@@ -45,6 +66,7 @@
# Run each test, capturing stdout and stderr.
numpass = 0
+ numnotmandatedfail = 0
for (scene,testname,testpath) in tests:
cmd = ['python', os.path.join(os.getcwd(),testpath)] + sys.argv[1:]
outdir = os.path.join(topdir,scene)
@@ -54,14 +76,22 @@
with open(outpath,"w") as fout, open(errpath,"w") as ferr:
retcode = subprocess.call(cmd,stderr=ferr,stdout=fout,cwd=outdir)
t1 = time.time()
- print "%s %s/%s [%.1fs]" % (
- "PASS" if retcode==0 else "FAIL", scene, testname, t1-t0)
- if retcode == 0:
+ retstr = "PASS "
+ if retcode != 0:
+ retstr = "FAIL*" if testname in NOT_YET_MANDATED[scene] else "FAIL "
+
+ if retstr == "FAIL*":
+ numnotmandatedfail += 1
+
+ print "%s %s/%s [%.1fs]" % (retstr, scene, testname, t1-t0)
+ if retcode == 0 or testname in NOT_YET_MANDATED[scene]:
numpass += 1
- its.device.ItsSession.report_result(numpass == len(tests))
print "\n%d / %d tests passed (%.1f%%)" % (
numpass, len(tests), 100.0*float(numpass)/len(tests))
+ if numnotmandatedfail > 0:
+ print "(*) tests are not yet mandated"
+ its.device.ItsSession.report_result(numpass == len(tests))
if __name__ == '__main__':
main()