From fbf9b5517d1c8d3a5e906477b9e4a11866168559 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 24 Aug 2018 22:35:04 +0100 Subject: [PATCH] test suite: lib-gdr: Check that we made patches with gdr 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 --- tests/lib-gdr | 11 +++++++++++ tests/tests/gdr-subcommands | 1 + 2 files changed, 12 insertions(+) diff --git a/tests/lib-gdr b/tests/lib-gdr index 9ea5af51..acbfa92d 100644 --- a/tests/lib-gdr +++ b/tests/lib-gdr @@ -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' +} diff --git a/tests/tests/gdr-subcommands b/tests/tests/gdr-subcommands index 4197ab01..672ddc98 100755 --- a/tests/tests/gdr-subcommands +++ b/tests/tests/gdr-subcommands @@ -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~ ;; -- 2.30.2