summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-01 22:32:53 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-01 22:32:56 +0100
commitfbf7faf2761cbb5333bf75b993fa56d460d0fa39 (patch)
tree77d14c30d85099bc82128032e8da35db1fa2367e /tests
parent41a084b412bdfd571a9d48d8e15604dbb72e6470 (diff)
Test suite: When sbuild fails, do not crash
... due to sed not finding the log file. Instead, simply tolerate the absence of the log file.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tests/build-modes-sbuild9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/tests/build-modes-sbuild b/tests/tests/build-modes-sbuild
index 826c467..a4ffcf5 100755
--- a/tests/tests/build-modes-sbuild
+++ b/tests/tests/build-modes-sbuild
@@ -15,9 +15,12 @@ after-hook () {
# run. We know it must be running it in the chroot because we
# provide sbuild with the dsc, not the tree, so we simply
# ignore all executions of the clean target by schroot.
- sed '
- s/^EXAMPLE RULES TARGET clean/HOOK SUPPRESSED &/;
- ' ../example_1.0_$arch.build >>$bmlog
+ local sblog=../example_1.0_$arch.build
+ if [ -e $sblog ]; then
+ sed '
+ s/^EXAMPLE RULES TARGET clean/HOOK SUPPRESSED &/;
+ ' <$sblog >>$bmlog
+ fi
}
bm_quirk_after_act=after-hook