chiark / gitweb /
test suite: lib-import-chk: Test commit authorship
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Feb 2017 19:45:11 +0000 (19:45 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 5 Feb 2017 20:36:49 +0000 (20:36 +0000)
Check that commits have smae authorship as appears in the changelog.
(Or, at least, the same authorship set.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
tests/lib-import-chk

index a63f27db2bdcc91192dcf83fca6c0ccc7bfb01db..4e3ecdcbcc8b6802a820a000acac967a46f64c9a 100644 (file)
@@ -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.)
 
  --
 
index ee33cbefa431bbd36382ebfbca64be4836d97c88..a456b014bdf4da831cb206c952e4e53200049d62 100644 (file)
@@ -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'