summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2019-11-28 01:53:07 +0100
committerThomas Monjalon <thomas@monjalon.net>2019-11-28 01:53:07 +0100
commit070b31649e48460b3dc4fb0ef44bb83b09b0a157 (patch)
treec84cf3959bf09174d0eda0651e8a29e2888d1cb7
parentbb5b0b828e1bbe441cd3e579857583ac271228fc (diff)
downloaddpdk-ci-master.zip
dpdk-ci-master.tar.gz
dpdk-ci-master.tar.xz
tests: check In-Reply-To with checkpatchHEADmaster
When sending new versions of a patch, they should be in the same thread. A reminder for this rule is added in the checkpatch test. Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
-rwxr-xr-xtests/checkpatch.sh9
-rwxr-xr-xtools/parse-email.sh2
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/checkpatch.sh b/tests/checkpatch.sh
index b2e420e..0ce5414 100755
--- a/tests/checkpatch.sh
+++ b/tests/checkpatch.sh
@@ -36,6 +36,13 @@ eval $($toolsdir/parse-email.sh $email)
[ -n "$subject" -a -n "$from" ] || exit 0
failed=false
+
+# check In-Reply-To for version > 1
+if echo $subject | grep -qi 'v[2-9].*\]' && [ -z "$reply" ] ; then
+ failed=true
+ replyto_msg='Must be a reply to the first patch (--in-reply-to).\n\n'
+fi
+
report=$($dpdkdir/devtools/checkpatches.sh -q $email) || failed=true
report=$(echo "$report" | sed '1,/^###/d')
@@ -43,6 +50,6 @@ label='checkpatch'
$failed && status='WARNING' || status='SUCCESS'
$failed && desc='coding style issues' || desc='coding style OK'
-echo "$report" | $toolsdir/send-patch-report.sh \
+echo "$replyto_msg$report" | $toolsdir/send-patch-report.sh \
-t "$subject" -f "$from" -m "$msgid" -p "$pwid" -o "$listid" \
-l "$label" -s "$status" -d "$desc"
diff --git a/tools/parse-email.sh b/tools/parse-email.sh
index 3d7a71f..9cb9583 100755
--- a/tools/parse-email.sh
+++ b/tools/parse-email.sh
@@ -37,6 +37,7 @@ msgid=$(getheader Message-Id "$1")
[ -n "$msgid" ] || msgid=$(getheader Message-ID "$1")
pwid=$(getheader X-Patchwork-Id "$1")
listid=$(getheader List-Id "$1")
+reply=$(getheader In-Reply-To "$1")
cat <<- END_OF_HEADERS
subject="$subject"
@@ -44,4 +45,5 @@ cat <<- END_OF_HEADERS
msgid="$msgid"
pwid="$pwid"
listid="$listid"
+ reply="$reply"
END_OF_HEADERS