Expose face presence diagnostics and bound camera readiness recovery
This commit is contained in:
@@ -7,6 +7,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_face_diagnostics_release_preserves_startup_and_presence_and_uses_new_code(self):
|
||||
def stop_build(command,**kwargs):
|
||||
if command[0]=='python3':return
|
||||
self.assertIn('-PfaceDiagnosticsFix=true',command)
|
||||
self.assertIn('-PpresenceCandidate=true',command)
|
||||
self.assertIn('-PavatarStartupFix=true',command)
|
||||
self.assertIn('-PactionVersionCode=24',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}]}),patch.object(pack,'next_version',return_value=24),patch.object(pack.subprocess,'run',side_effect=stop_build):
|
||||
with self.assertRaises(ValueError):pack.publish({'manifest_sha256':pack.RUNTIME_FIX_PIN},None,24,full=True,startup_fix=True,face_diagnostics_fix=True)
|
||||
with self.assertRaisesRegex(RuntimeError,'build_sentinel'):pack.publish({'manifest_sha256':pack.RUNTIME_FIX_PIN},None,24,full=True,startup_fix=True,presence_candidate=True,face_diagnostics_fix=True)
|
||||
def test_fresh_presence_version_requires_startup_and_frozen_pack(self):
|
||||
report={'manifest_sha256':pack.RUNTIME_FIX_PIN}
|
||||
def stop_build(command,**kwargs):
|
||||
|
||||
Reference in New Issue
Block a user