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 9ea5af51bcacbbe1f885d0535bdb02339183b6f3..acbfa92d29cc5b8653e1ba4ab025474da2611ab3 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 4197ab011808615da731f767b49d08ba0153fcd6..672ddc988511599250ad15768287bd5b55d2dba3 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~
                ;;