fix(camera): isolate first callback session in code7 probe
This commit is contained in:
@@ -21,3 +21,4 @@ with tempfile.TemporaryDirectory(prefix='camera-controller-check-') as folder:
|
||||
subprocess.run([ns['JAVA'],'-cp',folder+':'+ns['cp'],'IsolatedProbeSuiteCheckKt'],check=True,cwd=ROOT,timeout=30)
|
||||
subprocess.run([ns['JAVA'],'-cp',folder+':'+ns['cp'],'ProbeRecoveryCheckKt'],check=True,cwd=ROOT,timeout=30)
|
||||
subprocess.run([ns['JAVA'],'-cp',folder+':'+ns['cp'],'SystemParameterCheckKt'],check=True,cwd=ROOT,timeout=30)
|
||||
subprocess.run([ns['JAVA'],'-cp',folder+':'+ns['cp'],'FirstCallbackCheckKt'],check=True,cwd=ROOT,timeout=30)
|
||||
|
||||
@@ -31,7 +31,7 @@ for wrap in reports[-10:]:
|
||||
for item,rawitem in zip(row['camera_probe']['results'],p.get('results',[])[:9]):
|
||||
ranges=rawitem.get('supported_fps_ranges_milli',[])
|
||||
if isinstance(ranges,list):item['supported_fps_ranges_milli']=[v for v in ranges[:16] if isinstance(v,list) and len(v)==2 and all(isinstance(n,int) and not isinstance(n,bool) and 0<=n<=240000 for n in v) and v[0]<=v[1]]
|
||||
if r.get('version_code') in (28,29,3,4,5,6):
|
||||
if r.get('version_code') in (28,29,3,4,5,6,7):
|
||||
row['events']=[]
|
||||
for e in r.get('logs',[]):
|
||||
msg=e.get('msg','')
|
||||
|
||||
@@ -32,8 +32,8 @@ def digest(path):
|
||||
|
||||
def verify(apk):
|
||||
badge = subprocess.check_output([str(TOOLS/'aapt'), 'dump', 'badging', str(apk)], text=True)
|
||||
for value in ("name='com.gorios.lanvoice.cameraprobe'", "versionCode='6'",
|
||||
"versionName='camera-probe-0.1.5'", "sdkVersion:'26'", "targetSdkVersion:'34'"):
|
||||
for value in ("name='com.gorios.lanvoice.cameraprobe'", "versionCode='7'",
|
||||
"versionName='camera-probe-0.1.6'", "sdkVersion:'26'", "targetSdkVersion:'34'"):
|
||||
require(value in badge, 'APK metadata: '+value)
|
||||
permissions = set(re.findall(r"^uses-permission: name='([^']+)'", badge, re.M))
|
||||
require(permissions == {'android.permission.CAMERA', 'android.permission.INTERNET',
|
||||
@@ -83,14 +83,20 @@ def verify(apk):
|
||||
sources[name] = digest(source)
|
||||
controller = (ROOT/'app/src/main/java/com/gorios/lanvoice/expression/CameraProbeController.kt').read_text()
|
||||
require(not re.search(r'\bpreviewFrameRate\s*=', controller), 'deprecated FPS setter must not coexist with range API')
|
||||
owner = (ROOT/'camera-probe/src/main/java/com/gorios/lanvoice/IsolatedCameraDiagnosticsActivity.kt').read_text()
|
||||
suite = (ROOT/'camera-probe/src/main/java/com/gorios/lanvoice/IsolatedProbeSuite.kt').read_text()
|
||||
require('private val plannedModes = IsolatedProbeSuite.SINGLE_CALLBACK_ORDER' in owner and
|
||||
'val SINGLE_CALLBACK_ORDER = listOf(CameraProbeMode.CAMERA1_SYSTEM_1080_CALLBACK)' in suite,
|
||||
'single first-callback production entry drift')
|
||||
trust = ROOT/'camera-probe/build/generated/cameraTrust/res/raw/gateway_cert.pem'
|
||||
require(trust.read_bytes() == (ROOT/'app/src/main/res/raw/gateway_cert.pem').read_bytes(), 'gateway trust drift')
|
||||
camera_sources = {str(p.relative_to(ROOT)): digest(p) for p in sorted((ROOT/'camera-probe/src').rglob('*')) if p.is_file()}
|
||||
return {'package': 'com.gorios.lanvoice.cameraprobe', 'version_name': 'camera-probe-0.1.5',
|
||||
'version_code': 6, 'min_sdk': 26, 'target_sdk': 34, 'certificate_sha256': CERT,
|
||||
return {'package': 'com.gorios.lanvoice.cameraprobe', 'version_name': 'camera-probe-0.1.6',
|
||||
'version_code': 7, 'min_sdk': 26, 'target_sdk': 34, 'certificate_sha256': CERT,
|
||||
'abi': 'arm64-v8a', 'assets': 0, 'microphone_permission': False,
|
||||
'shared_production_sources': sources, 'camera_application_sources': camera_sources,
|
||||
'camera_tests': 2, 'planned_modes': ['camera1_system_1080_preview','camera1_system_1080_callback'], 'requested_preview': {'width':1920,'height':1080,'format':'nv21','fps_min_milli':30000,'fps_max_milli':30000}, 'fps_api': 'preview_fps_range_only', 'process_isolated': True,
|
||||
'camera_tests': 1, 'planned_modes': ['camera1_system_1080_callback'], 'first_and_only_in_suite': True,
|
||||
'requested_preview': {'width':1920,'height':1080,'format':'nv21','fps_min_milli':30000,'fps_max_milli':30000}, 'fps_api': 'preview_fps_range_only', 'process_isolated': True,
|
||||
'run_limit_ms': 5000, 'close_limit_ms': 2000, 'process_exit_limit_ms': 4000, 'availability_limit_ms': 15000, 'surface_resize_handshake': True,
|
||||
'availability_is_streaming_proof': False, 'system_three_streams_reproduced': False, 'universal_third_party_restriction_confirmed': False, 'device': 'not_run'}
|
||||
|
||||
@@ -105,7 +111,7 @@ def main():
|
||||
subprocess.run([str(ROOT/'scripts/build.sh'), ':camera-probe:assembleDebug'], cwd=ROOT, check=True)
|
||||
built = ROOT/'camera-probe/build/outputs/apk/debug/camera-probe-debug.apk'
|
||||
report = verify(built)
|
||||
artifact = ROOT/'artifacts/lan-voice-camera-probe-v015-code6-debug.apk'
|
||||
artifact = ROOT/'artifacts/lan-voice-camera-probe-v016-code7-debug.apk'
|
||||
require(not artifact.exists() and not artifact.with_suffix('.apk.sha256').exists(), 'published camera version occupied')
|
||||
with artifact.open('xb') as target, built.open('rb') as source:
|
||||
shutil.copyfileobj(source, target)
|
||||
|
||||
Reference in New Issue
Block a user