chiark / gitweb /
826c46734d87f3e194c4c92caf9ab83e6cc5a4d3
[dgit.git] / tests / tests / build-modes-sbuild
1 #!/bin/bash
2 set -e
3 . tests/lib
4 . $troot/lib-build-modes
5
6 t-dependencies sbuild
7 t-restrict x-dgit-schroot-build
8
9 arch=$(dpkg-architecture -qDEB_BUILD_ARCH)
10 after-hook () {
11         # sbuild likes to run the package clean target in the chroot,
12         # which isn't necessary in our case.  We don't disable it in
13         # dgit because we want to do what sbuild does, in case there
14         # are packages which don't build unless their clean target was
15         # run.  We know it must be running it in the chroot because we
16         # provide sbuild with the dsc, not the tree, so we simply
17         # ignore all executions of the clean target by schroot.
18         sed '
19                 s/^EXAMPLE RULES TARGET clean/HOOK SUPPRESSED &/;
20         ' ../example_1.0_$arch.build >>$bmlog
21 }
22 bm_quirk_after_act=after-hook
23
24 bm-prep
25
26 act="sbuild -c build"
27 real_act="$act --no-arch-all"
28
29 e_source=true
30 e_targets='build-arch binary-arch'
31 bm-act-iterate
32
33 echo ok.