diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 21:06:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 21:06:40 +0000 |
commit | d827c6cf1631209f5042a9d1d8a7ecc24223c8a0 (patch) | |
tree | 91a431d301efd0e524bdfb0c46e97d591a9d7b03 /t/override_target.t | |
parent | Initial commit. (diff) | |
download | debhelper-d827c6cf1631209f5042a9d1d8a7ecc24223c8a0.tar.xz debhelper-d827c6cf1631209f5042a9d1d8a7ecc24223c8a0.zip |
Adding upstream version 13.11.4.upstream/13.11.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | t/override_target.t | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/t/override_target.t b/t/override_target.t new file mode 100755 index 0000000..235f904 --- /dev/null +++ b/t/override_target.t @@ -0,0 +1,30 @@ +#!/usr/bin/perl +use strict; +use warnings; +use Test::More; +plan(tests => 1); + +# This test is here to detect breakage in +# dh's rules_explicit_target, which parses +# slightly internal make output. +system("mkdir -p t/tmp/debian"); +system("cp debian/control debian/compat debian/changelog t/tmp/debian"); +open (OUT, ">", "t/tmp/debian/rules") || die "$!"; +my $binpath = $ENV{AUTOPKGTEST_TMP} ? '/usr/bin' : '../..'; +print OUT <<EOF; +#!/usr/bin/make -f +%: + PATH=../..:\$\$PATH PERL5LIB=../../lib $binpath/dh \$@ --without autoreconf + +override_dh_update_autotools_config override_dh_strip_nondeterminism: + +override_dh_auto_build: + echo "override called" +EOF +close OUT; +system("chmod +x t/tmp/debian/rules"); +my @output=`cd t/tmp && debian/rules build 2>&1`; +ok(grep { m/override called/ } @output) or do { + diag($_) for @output; +}; +system("rm -rf t/tmp"); |