diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:40:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:40:37 +0000 |
commit | cabd780cae125bed23f70d57db05ae0f32d8df4c (patch) | |
tree | aa0333438759b0295022ef95bd38df6b7226a89c /scripts/t | |
parent | Releasing progress-linux version 1.22.4-0.0~progress7.99u1. (diff) | |
download | dpkg-cabd780cae125bed23f70d57db05ae0f32d8df4c.tar.xz dpkg-cabd780cae125bed23f70d57db05ae0f32d8df4c.zip |
Merging upstream version 1.22.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/t')
-rw-r--r-- | scripts/t/Dpkg_BuildFlags.t | 117 | ||||
-rw-r--r-- | scripts/t/Dpkg_OpenPGP.t | 1 |
2 files changed, 117 insertions, 1 deletions
diff --git a/scripts/t/Dpkg_BuildFlags.t b/scripts/t/Dpkg_BuildFlags.t index 530871c..515ed15 100644 --- a/scripts/t/Dpkg_BuildFlags.t +++ b/scripts/t/Dpkg_BuildFlags.t @@ -16,7 +16,7 @@ use strict; use warnings; -use Test::More tests => 40; +use Test::More tests => 100; BEGIN { $ENV{DEB_BUILD_ARCH} = 'amd64'; @@ -171,4 +171,119 @@ $ENV{DEB_BUILD_MAINT_OPTIONS} = 'future=+lfs abi=-lfs'; $bf = Dpkg::BuildFlags->new(); test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +# Test time64 abi features, for a 64-bit system, a 32-bit system with time64 +# and a 32-bit system with time32. + +# 32-bit system with time32, time64 not enabled by default. +$ENV{DEB_BUILD_ARCH} = 'i386'; +$ENV{DEB_HOST_ARCH} = 'i386'; + +undef $ENV{DEB_BUILD_MAINT_OPTIONS}; +$bf = Dpkg::BuildFlags->new(); +test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_noflag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_noflag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +$ENV{DEB_BUILD_MAINT_OPTIONS} = 'abi=+time64'; +$bf = Dpkg::BuildFlags->new(); +test_has_flag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_flag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_flag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +$ENV{DEB_BUILD_MAINT_OPTIONS} = 'abi=-time64'; +$bf = Dpkg::BuildFlags->new(); +test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_noflag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_noflag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +# 32-bit system with time32 and no time64. +$ENV{DEB_BUILD_ARCH} = 'hurd-i386'; +$ENV{DEB_HOST_ARCH} = 'hurd-i386'; + +undef $ENV{DEB_BUILD_MAINT_OPTIONS}; +$bf = Dpkg::BuildFlags->new(); +test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_noflag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_noflag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +$ENV{DEB_BUILD_MAINT_OPTIONS} = 'abi=+time64'; +$bf = Dpkg::BuildFlags->new(); +test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_noflag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_noflag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +$ENV{DEB_BUILD_MAINT_OPTIONS} = 'abi=-time64'; +$bf = Dpkg::BuildFlags->new(); +test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_noflag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_noflag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +# 32-bit system with time32, time64 enabled by default. +$ENV{DEB_BUILD_ARCH} = 'armhf'; +$ENV{DEB_HOST_ARCH} = 'armhf'; + +undef $ENV{DEB_BUILD_MAINT_OPTIONS}; +$bf = Dpkg::BuildFlags->new(); +test_has_flag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_flag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_flag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +$ENV{DEB_BUILD_MAINT_OPTIONS} = 'abi=+time64'; +$bf = Dpkg::BuildFlags->new(); +test_has_flag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_flag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_flag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +$ENV{DEB_BUILD_MAINT_OPTIONS} = 'abi=-time64'; +$bf = Dpkg::BuildFlags->new(); +test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_flag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_noflag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_flag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_noflag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +# 64-bit system with built-in time64. +$ENV{DEB_BUILD_ARCH} = 'amd64'; +$ENV{DEB_HOST_ARCH} = 'amd64'; + +undef $ENV{DEB_BUILD_MAINT_OPTIONS}; +$bf = Dpkg::BuildFlags->new(); +test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_noflag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_noflag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +$ENV{DEB_BUILD_MAINT_OPTIONS} = 'abi=+time64'; +$bf = Dpkg::BuildFlags->new(); +test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_noflag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_noflag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + +$ENV{DEB_BUILD_MAINT_OPTIONS} = 'abi=-time64'; +$bf = Dpkg::BuildFlags->new(); +test_has_noflag($bf, 'CPPFLAGS', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_LARGEFILE_SOURCE -U_FILE_OFFSET_BITS'); +test_has_noflag($bf, 'CPPFLAGS', '-D_TIME_BITS=64'); +test_has_noflag($bf, 'CPPFLAGS', '-U_TIME_BITS'); +test_has_noflag($bf, 'CFLAGS', '-Werror=implicit-function-declaration'); + # TODO: Add more test cases. diff --git a/scripts/t/Dpkg_OpenPGP.t b/scripts/t/Dpkg_OpenPGP.t index c3cd724..d409082 100644 --- a/scripts/t/Dpkg_OpenPGP.t +++ b/scripts/t/Dpkg_OpenPGP.t @@ -27,6 +27,7 @@ use Dpkg::OpenPGP::KeyHandle; my %backend_cmd = ( auto => 'auto', + 'gpg-sq' => 'gpg', gpg => 'gpg', sq => 'sq', sqop => 'sop', |