Clarify blocked camera suite and trace native calls with default preview baseline
This commit is contained in:
@@ -8,17 +8,17 @@ spec=importlib.util.spec_from_file_location('presence_package',ROOT/'scripts/pac
|
||||
pack=importlib.util.module_from_spec(spec);spec.loader.exec_module(pack)
|
||||
|
||||
class PresencePackageTests(unittest.TestCase):
|
||||
def test_camera_matrix_release_requires_code28_and_preview_guards(self):
|
||||
def test_camera_matrix_release_requires_code29_and_preview_guards(self):
|
||||
def stop_build(command,**kwargs):
|
||||
if command[0]=='python3': return
|
||||
for flag in ('-PcameraProbeDiagnostic=true','-PcameraPreviewStream=true','-PactionVersionCode=28'):
|
||||
for flag in ('-PcameraProbeDiagnostic=true','-PcameraPreviewStream=true','-PactionVersionCode=29'):
|
||||
self.assertIn(flag,command)
|
||||
raise RuntimeError('build_sentinel')
|
||||
with patch.object(pack,'tested_source'),patch.object(pack,'packaging_tests_current'),patch.object(pack,'read_json',
|
||||
return_value={'edges':[{'nativeLoop':True}],'camera_callback_replay':True}),patch.object(pack,'next_version',return_value=28),patch.object(pack.subprocess,'run',side_effect=stop_build):
|
||||
return_value={'edges':[{'nativeLoop':True}],'camera_callback_replay':True}),patch.object(pack,'next_version',return_value=29),patch.object(pack.subprocess,'run',side_effect=stop_build):
|
||||
flags=dict(full=True,startup_fix=True,presence_candidate=True,face_diagnostics_fix=True,camera_compatibility_fix=True,camera_direct_yuv=True,camera_probe_diagnostic=True)
|
||||
with self.assertRaises(ValueError):pack.publish({'manifest_sha256':pack.RUNTIME_FIX_PIN},None,28,**flags)
|
||||
with self.assertRaisesRegex(RuntimeError,'build_sentinel'):pack.publish({'manifest_sha256':pack.RUNTIME_FIX_PIN},None,28,camera_preview_stream=True,**flags)
|
||||
with self.assertRaises(ValueError):pack.publish({'manifest_sha256':pack.RUNTIME_FIX_PIN},None,29,**flags)
|
||||
with self.assertRaisesRegex(RuntimeError,'build_sentinel'):pack.publish({'manifest_sha256':pack.RUNTIME_FIX_PIN},None,29,camera_preview_stream=True,**flags)
|
||||
|
||||
def test_camera_matrix_cli_is_one_purpose(self):
|
||||
with tempfile.TemporaryDirectory() as folder:
|
||||
|
||||
Reference in New Issue
Block a user