chiark / gitweb /
Test suite: When sbuild fails, do not crash
[dgit.git] / tests / tests / build-modes-sbuild
index 826c46734d87f3e194c4c92caf9ab83e6cc5a4d3..a4ffcf5b6a3e8f175f63ed186b2ea620beef2ebb 100755 (executable)
@@ -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