summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2020-06-05 18:25:00 +0100
committerBen Hutchings <ben.hutchings@codethink.co.uk>2020-06-05 18:41:21 +0100
commit18a8e44baae292971d6ca47ba8d6a95545c668f9 (patch)
tree0b9385107af77c616d5da505641f9d4cda51b70d /tests
parent90c88cf0220a12103e38a2f9e6392de5ffe2d481 (diff)
downloadlorry-18a8e44baae292971d6ca47ba8d6a95545c668f9.tar.gz
tests: Fix test failure with newer git versions that create more files
When comparing the repository file list with the expected list, ignore objects/pack/pack-*.bitmap (created by default since 2.22) and objects/info/commit-graph (created by default since 2.24).
Diffstat (limited to 'tests')
-rwxr-xr-xtests/git-backup-on-error-multiple-backups.script2
-rwxr-xr-xtests/git-backup-on-error-single-backup.script2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/git-backup-on-error-multiple-backups.script b/tests/git-backup-on-error-multiple-backups.script
index bcc165b..af67879 100755
--- a/tests/git-backup-on-error-multiple-backups.script
+++ b/tests/git-backup-on-error-multiple-backups.script
@@ -32,6 +32,8 @@ normalize() {
-e "s|git-post-fail-$DATETIMESPEC|git-post-fail-DATETIME|g" \
-e "s/pack-[0-9a-z]+\.(idx|pack)$/pack-file/" \
-e '/hooks\/.*\.sample/d' \
+ -e "/\/objects\/info\/commit-graph$/d" \
+ -e "/\/objects\/pack\/pack-[0-9a-z]+\.bitmap$/d" \
-e "s|$DATADIR|DATADIR|g" "$@"
}
diff --git a/tests/git-backup-on-error-single-backup.script b/tests/git-backup-on-error-single-backup.script
index 23d0f36..40ec12a 100755
--- a/tests/git-backup-on-error-single-backup.script
+++ b/tests/git-backup-on-error-single-backup.script
@@ -31,6 +31,8 @@ postbackup="$workdir/$repo_name/git-post-fail"
normalize() {
sed -r -e '/hooks\/.*\.sample/d' \
-e "s/pack-[0-9a-z]+\.(idx|pack)$/pack-file/" \
+ -e "/\/objects\/info\/commit-graph$/d" \
+ -e "/\/objects\/pack\/pack-[0-9a-z]+\.bitmap$/d" \
-e "s|$DATADIR|DATADIR|g" "$@"
}