diff options
| author | Carlos Fernandez <carlosfsanz@meta.com> | 2026-04-03 11:25:54 -0700 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2026-04-06 14:16:04 -0700 |
| commit | 854b330967a296e03d49d492c2a3a13a71f14026 (patch) | |
| tree | 2239382de481789ed84624fd405d6ff4b7dce0ce /tests/test_wrapper.py | |
| parent | 654690e1b8695d72885533016482306e32528f48 (diff) | |
| download | git-repo-854b330967a296e03d49d492c2a3a13a71f14026.tar.gz git-repo-854b330967a296e03d49d492c2a3a13a71f14026.zip | |
test_wrapper: add test for repo script executable permission
Add a test to verify that the repo launcher script has the
executable bit set, guarding against accidental permission changes.
Change-Id: I314658b57ed174673188fbbc5962d9fdeefac97d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/569242
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Carlos Fernandez <carlosfsanz@meta.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Carlos Fernandez <carlosfsanz@meta.com>
Diffstat (limited to 'tests/test_wrapper.py')
| -rw-r--r-- | tests/test_wrapper.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index 7a1a87289..12c30c786 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -106,6 +106,11 @@ class TestRepoWrapper: >= repo_wrapper.MIN_PYTHON_VERSION_HARD ) + def test_repo_script_is_executable(self) -> None: + """The repo launcher script should be executable.""" + repo_path = utils_for_test.THIS_DIR.parent / "repo" + assert os.access(repo_path, os.X_OK), f"{repo_path} is not executable" + def test_init_parser(self, repo_wrapper: wrapper.Wrapper) -> None: """Make sure 'init' GetParser works.""" parser = repo_wrapper.GetParser() |
