mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-24 18:42:07 +08:00
test_updated: ensure symlinks are copied properly (#31825)
test symlink
old-commit-hash: 7779f6875f
This commit is contained in:
@@ -32,6 +32,10 @@ def update_release(directory, name, version, agnos_version, release_notes):
|
||||
with open(directory / "launch_env.sh", "w") as f:
|
||||
f.write(f'export AGNOS_VERSION="{agnos_version}"')
|
||||
|
||||
test_symlink = directory / "test_symlink"
|
||||
if not os.path.exists(str(test_symlink)):
|
||||
os.symlink("common/version.h", test_symlink)
|
||||
|
||||
|
||||
@pytest.mark.slow # TODO: can we test overlayfs in GHA?
|
||||
class BaseUpdateTest(unittest.TestCase):
|
||||
@@ -111,6 +115,9 @@ class BaseUpdateTest(unittest.TestCase):
|
||||
self.assertEqual(get_version(str(self.staging_root / "finalized")), version)
|
||||
self.assertEqual(get_consistent_flag(), True)
|
||||
|
||||
with open(self.staging_root / "finalized" / "test_symlink") as f:
|
||||
self.assertIn(version, f.read())
|
||||
|
||||
def wait_for_condition(self, condition, timeout=12):
|
||||
start = time.monotonic()
|
||||
while True:
|
||||
|
||||
Reference in New Issue
Block a user