Skip to content

Commit

Permalink
t9390: skip the version test if we are in some kind of installation
Browse files Browse the repository at this point in the history
The version test assumes we are in a clone of the git-filter-repo
repository, without the kind of changes that would be performed by an
installation of git-filter-repo (which may, for example, change the
shebang line or the @@LOCALEDIR@@ references).  So, if we are testing
an installation of git-filter-repo, simply skip this test.

Signed-off-by: Elijah Newren <[email protected]>
  • Loading branch information
newren committed Aug 2, 2024
1 parent e1b7c3d commit ac50405
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion t/t9390-filter-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1899,7 +1899,17 @@ test_expect_success 'tweaking just a tag' '
)
'

test_expect_success '--version' '
test_lazy_prereq IN_FILTER_REPO_CLONE '
git -C ../../ rev-parse HEAD:git-filter-repo &&
grep @@LOCALEDIR@@ ../../../git-filter-repo &&
head -n 1 ../../../git-filter-repo | grep "/usr/bin/env python3$"
'

# Next test depends on git-filter-repo coming from the git-filter-repo
# not having been modified by e.g. normal installation. Skip the test
# if we're in some kind of installation of filter-repo rather than in a
# simple clone of the original repository.
test_expect_success IN_FILTER_REPO_CLONE '--version' '
git filter-repo --version >actual &&
git hash-object ../../git-filter-repo | cut -c 1-12 >expect &&
test_cmp expect actual
Expand Down

0 comments on commit ac50405

Please sign in to comment.