Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/test_repo_utils: correctly parse system git version #1993

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

kshtsk
Copy link
Contributor

@kshtsk kshtsk commented Aug 4, 2024

On macos there are bunch of tests fails because system git version output cannot be parsed because of extra ending.

Output example for macOS:

   git version 2.39.3 (Apple Git-146)

Output example for linux:

   git version 2.45.2

On macos there are bunch of tests fails because system
git version output cannot be parsed because of extra ending.

Output example for macos:
   git version 2.39.3 (Apple Git-146)
Output example for linux:
   git version 2.45.2

Signed-off-by: Kyr Shatskyy <[email protected]>
@kshtsk kshtsk requested a review from zmc August 4, 2024 23:19
@kshtsk
Copy link
Contributor Author

kshtsk commented Aug 4, 2024

This is how it looks like before the fix:

========================================================================== short test summary info ==========================================================================
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_clone_repo_existing_branch - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_clone_repo_non_existing_branch - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_fetch_no_repo - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_fetch_noop - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_fetch_branch_no_repo - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_fetch_branch_fake_branch - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_fetch_branch_different_git_versions[fatal: couldn't find remote ref] - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_fetch_branch_different_git_versions[fatal: Couldn't find remote ref] - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_enforce_existing_branch - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_enforce_existing_commit - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_enforce_non_existing_branch - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_enforce_non_existing_commit - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_enforce_multiple_calls_same_branch - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_enforce_multiple_calls_different_branches - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_enforce_invalid_branch - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_simultaneous_access - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_simultaneous_access_different_branches - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_url_to_dirname[[email protected]/ceph-qa-suite.git-git.ceph.com_ceph-qa-suite] - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_url_to_dirname[git://git.ceph.com/ceph-qa-suite.git-git.ceph.com_ceph-qa-suite] - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_url_to_dirname[https://github.com/ceph/ceph-github.com_ceph_ceph] - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_url_to_dirname[https://github.com/liewegas/ceph.git-github.com_liewegas_ceph] - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_url_to_dirname[file:///my/dir/has/ceph.git-my_dir_has_ceph] - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
ERROR teuthology/test/test_repo_utils.py::TestRepoUtils::test_current_branch - packaging.version.InvalidVersion: Invalid version: 'Git-146)'
=================================================== 1053 passed, 87 skipped, 13 warnings, 23 errors in 251.17s (0:04:11) ====================================================

Copy link
Member

@zmc zmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use homebrew's git so I never saw this! Thank you.

@zmc zmc merged commit a09a2ef into ceph:main Aug 7, 2024
9 checks passed
@kshtsk kshtsk deleted the wip-allow-apple-git branch August 7, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants