diff options
author | Junichi Uekawa <dancer@netfort.gr.jp> | 2009-11-29 10:14:09 +0900 |
---|---|---|
committer | Junichi Uekawa <dancer@netfort.gr.jp> | 2009-11-29 10:14:09 +0900 |
commit | c789e0695482a3ee37c2374082dfb1725bcd627b (patch) | |
tree | 067a44b46bb95f04efe41bfce7040a0a1f723090 | |
parent | 0da3af7187a61ce9e91d5502322890fae1fe6577 (diff) | |
download | pbuilder-c789e0695482a3ee37c2374082dfb1725bcd627b.tar pbuilder-c789e0695482a3ee37c2374082dfb1725bcd627b.tar.gz |
adding a regression test for 526471 to try to understand the problem.
-rw-r--r-- | pdebuild-internal | 4 | ||||
-rwxr-xr-x | testsuite/regression/526471-pdebuild-fail-scripts.sh | 26 |
2 files changed, 28 insertions, 2 deletions
diff --git a/pdebuild-internal b/pdebuild-internal index 54ca58f..d309c51 100644 --- a/pdebuild-internal +++ b/pdebuild-internal @@ -1,6 +1,6 @@ #! /bin/bash # pbuilder-internal -- personal Debian package builder, internal routine -# Copyright (C) 2003-2007 Junichi Uekawa +# Copyright (C) 2003-2009 Junichi Uekawa # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -78,7 +78,7 @@ while [ -n "$1" ]; do done # fool pbuilder-runhooks to use / as buildplace, since I am inside chroot. -BUILDPLACE= +BUILDPLACE=/ . /usr/lib/pbuilder/pbuilder-runhooks executehooks "D" diff --git a/testsuite/regression/526471-pdebuild-fail-scripts.sh b/testsuite/regression/526471-pdebuild-fail-scripts.sh new file mode 100755 index 0000000..c0df1de --- /dev/null +++ b/testsuite/regression/526471-pdebuild-fail-scripts.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# test pbuilder executes the failure script on failure +# run like: +# rm -r work/; mkdir work/ ; ./526471-pdebuild-fail-scripts.sh + +set -e +mkdir work/526471 +mkdir work/526471-hook +echo 'echo failpkg-hook-executed' > work/526471-hook/C01_failhook +chmod a+x work/526471-hook/C01_failhook +echo 'echo failpkg-F-hook-executed' > work/526471-hook/F01_hook +chmod a+x work/526471-hook/F01_hook +echo 'echo failpkg-A-hook-executed' > work/526471-hook/A01_hook +chmod a+x work/526471-hook/A01_hook +HOOKDIR=$(readlink -f work/526471-hook) + +cd work/526471 +dpkg-source -x ../../../random-manual-test-material/failpkg/failpkg_0.1.dsc +cd failpkg-0.1 + +# the next command fails, but the error code is eaten by pipe; tee succeeds. +pdebuild --use-pdebuild-internal -- --hookdir "${HOOKDIR}" | tee ../526471.log + +# I want to check for the output content. C01_failhook should have +# been ran and output there. +grep 'failpkg-hook-executed' 526471.log
\ No newline at end of file |