From 7779f6875fd14dcd26edea4c9f521feb6414ac7e Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Mon, 11 Mar 2024 13:40:42 -0400 Subject: [PATCH] test_updated: ensure symlinks are copied properly (#31825) test symlink --- selfdrive/updated/tests/test_base.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/selfdrive/updated/tests/test_base.py b/selfdrive/updated/tests/test_base.py index 9065899eb8..3060db1bdd 100644 --- a/selfdrive/updated/tests/test_base.py +++ b/selfdrive/updated/tests/test_base.py @@ -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: