mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-28 05:54:08 +08:00
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* proc
* release
* fix
* this should move here
* e2e update test
* that too
* fix
* fix
* fix running in docker
* don't think GHA will work
* also test switching branches
* it's a test
* lets not delete that yet
* fix
* fix2
* fix
* fix
* tests too
* fix
* cleanup / init
* test agnos update
* test agnos
* move this back up
* no diff
old-commit-hash: b93f6ce4f6
23 lines
840 B
Python
23 lines
840 B
Python
import contextlib
|
|
from openpilot.selfdrive.updated.tests.test_base import BaseUpdateTest, run, update_release
|
|
|
|
|
|
class TestUpdateDGitStrategy(BaseUpdateTest):
|
|
def update_remote_release(self, release):
|
|
update_release(self.remote_dir, release, *self.MOCK_RELEASES[release])
|
|
run(["git", "add", "."], cwd=self.remote_dir)
|
|
run(["git", "commit", "-m", f"openpilot release {release}"], cwd=self.remote_dir)
|
|
|
|
def setup_remote_release(self, release):
|
|
run(["git", "init"], cwd=self.remote_dir)
|
|
run(["git", "checkout", "-b", release], cwd=self.remote_dir)
|
|
self.update_remote_release(release)
|
|
|
|
def setup_basedir_release(self, release):
|
|
super().setup_basedir_release(release)
|
|
run(["git", "clone", "-b", release, self.remote_dir, self.basedir])
|
|
|
|
@contextlib.contextmanager
|
|
def additional_context(self):
|
|
yield
|