From 8c0703a043f1deedc4dee9500d8f7da8b382543a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 5 Feb 2017 19:45:11 +0000 Subject: test suite: lib-import-chk: Test commit authorship Check that commits have smae authorship as appears in the changelog. (Or, at least, the same authorship set.) Signed-off-by: Ian Jackson --- debian/changelog | 2 ++ tests/lib-import-chk | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/debian/changelog b/debian/changelog index a63f27d..4e3ecdc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ dgit (3.10~) unstable; urgency=medium Test suite: * quilt-useremail: New test for user config copying (#853085). + * lib-import-chk: Test that commits have smae authorship as appears in + the changelog. (Or, at least, the same authorship set.) -- diff --git a/tests/lib-import-chk b/tests/lib-import-chk index ee33cbe..a456b01 100644 --- a/tests/lib-import-chk +++ b/tests/lib-import-chk @@ -1,4 +1,14 @@ +t-import-chk-authorship () { + perl -ne 'print $1,"\n" if m/^ -- (\S.*\>) /' debian/changelog \ + | sort -u \ + > $tmp/authorship.changelog + git log --pretty=format:'%an <%ae>%n%cn <%ce>' \ + | sort -u \ + > $tmp/authorship.commits + diff $tmp/authorship.{changelog,commits} +} + t-import-chk1 () { p=$1 v=$2 @@ -15,6 +25,8 @@ t-import-chk2() { cd $p + t-import-chk-authorship + git branch first-import m='Commit for import check' -- cgit v1.2.3