Fix candidate build metadata and runtime safeguards
Offline project checks / check (push) Canceled after 0s
Offline project checks / check (push) Canceled after 0s
Repair kernel patch formatting and refresh kernel/camera package revisions and checksums. Integrate battery guard into generated images, correct charging controls and emergency shutdown handling, and reject invalid camera authentication configuration. Extend recipe validation and regression coverage, and update build and installation documentation. Kernel, camera and image compilation remain pending on the build server.
This commit is contained in:
@@ -37,6 +37,9 @@ class ImageRuntimeTests(unittest.TestCase):
|
||||
self.assertEqual(runtime.audit(self.root), self.result)
|
||||
self.assertEqual(self.result['screens_verified'], 2)
|
||||
self.assertTrue((self.root / 'etc/runlevels/default/platina-power-chord').is_file())
|
||||
self.assertTrue(self.result['battery_guard_active'])
|
||||
self.assertTrue((self.root / 'etc/runlevels/default/platina-battery-guard').is_file())
|
||||
self.assertTrue((self.root / 'usr/local/sbin/platina-battery-guard').is_file())
|
||||
self.assertIn('dry_run=no', (self.root / runtime.CONFIG).read_text())
|
||||
self.assertEqual((self.root / 'etc/platina-release').read_text(),
|
||||
'Platina Linux ' + self.result['version'] + '\n')
|
||||
@@ -66,6 +69,14 @@ class ImageRuntimeTests(unittest.TestCase):
|
||||
with self.assertRaisesRegex(ValueError, 'symlink'):
|
||||
runtime.audit(self.root)
|
||||
|
||||
def test_battery_guard_missing_or_disabled_is_rejected(self):
|
||||
(self.root / 'etc/runlevels/default/platina-battery-guard').unlink()
|
||||
with self.assertRaisesRegex(ValueError, 'symlink'):
|
||||
runtime.audit(self.root)
|
||||
(self.root / 'usr/local/sbin/platina-battery-guard').unlink()
|
||||
with self.assertRaises(FileNotFoundError):
|
||||
runtime.audit(self.root)
|
||||
|
||||
def test_manifest_cannot_add_unrelated_or_traversing_files(self):
|
||||
path = self.root / runtime.MANIFEST
|
||||
manifest = json.loads(path.read_text())
|
||||
|
||||
Reference in New Issue
Block a user