t: skip pack tests if not using SHA-1
These tests rely on creating packs with specially named objects which are necessarily dependent on the hash used. Skip these tests if we're not using SHA-1. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
May 13, 2018 at 02:24 UTC
2bc3d1266842ffb4b46c68900ebbd9a7e0887774
2 files changed
+12
t/t5308-pack-detect-duplicates.sh
+6
@@ -4,6 +4,12 @@ test_description='handling of duplicate objects in incoming packfiles'
4
. ./test-lib.sh
5
. "$TEST_DIRECTORY"/lib-pack.sh
6
7
+if ! test_have_prereq SHA1
8
+then
9
+ skip_all='not using SHA-1 for objects'
10
+ test_done
11
+fi
12
+
13
# The sha1s we have in our pack. It's important that these have the same
14
# starting byte, so that they end up in the same fanout section of the index.
15
# That lets us make sure we are exercising the binary search with both sets.
t/t5309-pack-delta-cycles.sh
+6
@@ -4,6 +4,12 @@ test_description='test index-pack handling of delta cycles in packfiles'
4
. ./test-lib.sh
5
. "$TEST_DIRECTORY"/lib-pack.sh
6
7
+if ! test_have_prereq SHA1
8
+then
9
+ skip_all='not using SHA-1 for objects'
10
+ test_done
11
+fi
12
+
13
# Two similar-ish objects that we have computed deltas between.
14
A=01d7713666f4de822776c7622c10f1b07de280dc
15
B=e68fe8129b546b101aee9510c5328e7f21ca1d18