Skip to content

Commit

Permalink
Robustify reproducibility test and anticipate crippled FS
Browse files Browse the repository at this point in the history
Must check history on the corresponding branch, if there is any.
  • Loading branch information
mih committed Feb 3, 2023
1 parent b25ea72 commit 629c3db
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions datalad_ebrains/tests/test_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ def test_clone_reproducibility(tmp_path):
tmp_path / 'v2',
**clone_kwargs
)[-1]
v1_history = list(dsv1.repo.call_git_items_(['log', '--oneline']))
v2_history = list(dsv2.repo.call_git_items_(['log', '--oneline']))
# make sure we check the corresponding branch on crippled FSes
# (will be the same for both datasets)
check_branch = dsv1.repo.get_corresponding_branch() \
or dsv1.repo.get_active_branch()
log_cmd = ['log', '--oneline', check_branch]
v1_history = list(dsv1.repo.call_git_items_(log_cmd))
v2_history = list(dsv2.repo.call_git_items_(log_cmd))
# the two version histories must be bit-identical, for all shared versions
assert v1_history == v2_history[1:]

Expand Down

0 comments on commit 629c3db

Please sign in to comment.