diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-07-17 21:24:21 +0200 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-07-17 21:24:21 +0200 |
commit | 798e22d35f9f9881a8b42e17e71feb0a1bfd5cdf (patch) | |
tree | 3c8557cb67b0e576a6e979c0c55bcdaf514f1ea4 /t | |
parent | 539bca9f979ff28672beaf37d11c2879653a7fc1 (diff) |
add test of dh's makefile parsing
Diffstat (limited to 't')
-rwxr-xr-x | t/override_target | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/override_target b/t/override_target new file mode 100755 index 00000000..995d032c --- /dev/null +++ b/t/override_target @@ -0,0 +1,22 @@ +#!/usr/bin/perl +use Test; +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 t/tmp/debian"); +open (OUT, ">", "t/tmp/debian/rules") || die "$!"; +print OUT <<EOF; +#!/usr/bin/make -f +%: + dh \$@ +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); +system("rm -rf t/tmp"); |