]> git.ipfire.org Git - thirdparty/git.git/commitdiff
test-lib: add prerequisite for 64-bit platforms
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Tue, 2 Nov 2021 15:46:06 +0000 (15:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Nov 2021 18:22:26 +0000 (11:22 -0700)
Allow tests that assume a 64-bit `size_t` to be skipped in 32-bit
platforms and regardless of the size of `long`.

This imitates the `LONG_IS_64BIT` prerequisite.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh

index adaf03543e810ea26bdbb0c7add0f3a06b992bed..af1a94c2c207afbfe212b78b7691c40494d89f59 100644 (file)
@@ -1642,6 +1642,10 @@ build_option () {
        sed -ne "s/^$1: //p"
 }
 
+test_lazy_prereq SIZE_T_IS_64BIT '
+       test 8 -eq "$(build_option sizeof-size_t)"
+'
+
 test_lazy_prereq LONG_IS_64BIT '
        test 8 -le "$(build_option sizeof-long)"
 '