summaryrefslogtreecommitdiffstats
path: root/src/build/tools/verify-commit
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-09-13 17:44:21 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-09-18 13:57:04 -0500
commitea1d37d7f7c107ea700d9ba125334ec869e91c40 (patch)
tree4e6549f8c4717dd9f94055c1895d1a7ea70b1b34 /src/build/tools/verify-commit
parent71f0f9b62fe2369493bd9f323423490a62abb85f (diff)
downloadtalos-hostboot-ea1d37d7f7c107ea700d9ba125334ec869e91c40.tar.gz
talos-hostboot-ea1d37d7f7c107ea700d9ba125334ec869e91c40.zip
Support CQ tag in tools.
Change-Id: I403ddc4dae11daaf1758daf9c525ed539635f3b4 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6160 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/tools/verify-commit')
-rwxr-xr-xsrc/build/tools/verify-commit28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/build/tools/verify-commit b/src/build/tools/verify-commit
index fc6002407..f42d53884 100755
--- a/src/build/tools/verify-commit
+++ b/src/build/tools/verify-commit
@@ -191,6 +191,7 @@ sub verifyCommitMsg
open COMMIT_CONTENTS, "git log -n1 --pretty=format:%B |";
my $lineCount = 0;
my $rtcTag = "";
+ my $cqTag = "";
my $taggedLine = "";
my $untaggedLine = "";
@@ -227,6 +228,7 @@ sub verifyCommitMsg
}
$rtcTag = "";
+ $cqTag = "";
$untaggedLine = "";
$taggedLine = "";
}
@@ -243,6 +245,12 @@ sub verifyCommitMsg
# Verify format of RTC message.
if ($line =~ m/^\s*RTC:\s*[0-9]+(.*)/)
{
+ if ("" ne $rtcTag)
+ {
+ error("Commit Message",$line,$lineCount,
+ "Duplicate RTC tag found.");
+ }
+
$rtcTag = $line;
if ("" ne $1)
{
@@ -251,6 +259,22 @@ sub verifyCommitMsg
}
}
+ if ($line =~ m/^\s*CQ: \s*[A-Z][A-Z][0-9]+(.*)/)
+ {
+ if ("" ne $cqTag)
+ {
+ error("Commit Message",$line,$lineCount,
+ "Duplicate CQ tag found.");
+ }
+
+ $cqTag = $line;
+ if ("" ne $1)
+ {
+ error("Commit Message",$line,$lineCount,
+ (sprintf "CQ tag format incorrect (%s).", $1));
+ }
+ }
+
# Identify if this is a tagged line or a non-tagged line and store
# away.
if ($line =~ m/^\s*[A-Za-z0-9\-_]+:[^:]/)
@@ -269,10 +293,10 @@ sub verifyCommitMsg
}
# Warn for missing RTC tag.
- if ("" eq $rtcTag)
+ if (("" eq $rtcTag) && ("" eq $cqTag))
{
warning("Commit Message","<end-of-file>",$lineCount,
- "RTC tag not found.");
+ "Neither RTC nor CQ tag found.");
}
# Error for a mix of tag / untagged in the last section (ie. untagged
OpenPOWER on IntegriCloud