chiark / gitweb /
test suite: lib-gdr: Check that we made patches with gdr
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 21:35:04 +0000 (22:35 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Aug 2018 21:39:27 +0000 (22:39 +0100)
Conveniently, the places where we don't want this, and are
deliberately looking for dgit-self-made patches, are gdr-makepatches7
and mix-it in gdr-subcommands; there, we don't push, so don't end up
checking t-gdr-made-patches.

We also add this check to the appropriate place in gdr-subcommands.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib-gdr
tests/tests/gdr-subcommands

index 9ea5af5..acbfa92 100644 (file)
@@ -21,6 +21,12 @@ t-gdr-good () {
        #   stitched
        #   pushed
 
+       case $state in
+       pushed*)
+               t-gdr-made-patches
+               ;;
+       esac
+
        git diff --quiet ${beforetag-t.before} -- ':.' ':!debian/patches'
 
        LC_MESSAGES=C t-git-debrebase status >../status.check
@@ -360,3 +366,8 @@ t-gdr-gbp-import-core () {
        git branch -D master
        git branch -m quilt-tip master
 }
+
+t-gdr-made-patches () {
+       git log -n1 --'pretty=format:%B' \
+       | egrep '^\[git-debrebase'
+}
index 4197ab0..672ddc9 100755 (executable)
@@ -168,6 +168,7 @@ make_check () {
        P*)
                t-dgit -wgf --quilt=nofix quilt-fixup
                git diff HEAD~ debian/patches | egrep .
+               t-gdr-made-patches
                git diff --quiet HEAD~ -- ':.' ':!debian/patches'
                git reset --hard HEAD~
                ;;