File: autopkgtest--version

package info (click to toggle)
git-filter-repo 2.38.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 952 kB
  • sloc: python: 4,193; sh: 3,847; makefile: 113
file content (32 lines) | stat: -rw-r--r-- 1,012 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Stefano Rivera <stefano@rivera.za.net>
Date: Tue, 16 Feb 2021 14:33:48 -0800
Subject: Calculate the version correctly in autopkgtest

Use the installed git-filter-repo.

The forwardable version would find where git-filter-repo is on PATH and
hash that, but our wrapper would break that, so ...

Forwarded: not-needed
---
 t/t9390-filter-repo.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/t/t9390-filter-repo.sh b/t/t9390-filter-repo.sh
index f96ee00..0d0299a 100755
--- a/t/t9390-filter-repo.sh
+++ b/t/t9390-filter-repo.sh
@@ -1802,7 +1802,12 @@ test_expect_success 'tweaking just a tag' '
 
 test_expect_success '--version' '
 	git filter-repo --version >actual &&
-	git hash-object ../../git-filter-repo | cut -c 1-12 >expect &&
+	if [ -e ../../git-filter-repo ]; then
+		filter_repo=../../git-filter-repo
+	else
+		filter_repo=/usr/lib/python3/dist-packages/git_filter_repo.py
+	fi &&
+	git hash-object $filter_repo | cut -c 1-12 >expect &&
 	test_cmp expect actual
 '