chiark / gitweb /
Test suite: Provide tests which check that all our various build operations run the...
[dgit.git] / tests / tests / build-modes-gbp
diff --git a/tests/tests/build-modes-gbp b/tests/tests/build-modes-gbp
new file mode 100755 (executable)
index 0000000..938e589
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+set -e
+. tests/lib
+. $troot/lib-build-modes
+
+t-dependencies git-buildpackage
+
+quirk-clean-fixup () {
+       case $cleanmode in
+       dpkg-source*)
+               # git-buildpackage runs the clean target twice somehow
+               perl -i.unfixed -ne '
+                       print unless
+                               $_ eq $last &&
+                               $_ eq "EXAMPLE RULES TARGET clean\n";
+                       $last = $_;
+               ' $bmgot
+               ;;
+       esac
+}
+bm_quirk_before_diff=quirk-clean-fixup
+
+bm-prep
+
+for act in                                     \
+       'git-build -S'                          \
+       'git-build -b'                          \
+       'git-build -B'                          \
+       'git-build -A'                          \
+       'git-build -F'                          \
+; do
+       bm-guess-e-source-e-targets "$act"
+       real_act="$act --git-ignore-branch"
+       bm-act-iterate
+done
+
+echo ok.