You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2016/04/09 18:24:24 UTC

[01/11] yetus git commit: YETUS-303. better sorting options for releasedocmaker [Forced Update!]

Repository: yetus
Updated Branches:
  refs/heads/YETUS-156 5767b0de4 -> 593aad2ac (forced update)


YETUS-303. better sorting options for releasedocmaker

Signed-off-by: Sean Busbey <bu...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/e58875dd
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/e58875dd
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/e58875dd

Branch: refs/heads/YETUS-156
Commit: e58875ddcd549ef22d4bbca393aaabee2b78ee85
Parents: 7355288
Author: Allen Wittenauer <aw...@apache.org>
Authored: Fri Mar 18 12:36:48 2016 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Apr 1 22:14:13 2016 -0500

----------------------------------------------------------------------
 .../in-progress/releasedocmaker.md              | 38 ++++++++++
 release-doc-maker/releasedocmaker.py            | 75 ++++++++++++++------
 2 files changed, 91 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/e58875dd/asf-site-src/source/documentation/in-progress/releasedocmaker.md
----------------------------------------------------------------------
diff --git a/asf-site-src/source/documentation/in-progress/releasedocmaker.md b/asf-site-src/source/documentation/in-progress/releasedocmaker.md
index 2a5f0cd..71d6619 100644
--- a/asf-site-src/source/documentation/in-progress/releasedocmaker.md
+++ b/asf-site-src/source/documentation/in-progress/releasedocmaker.md
@@ -114,6 +114,44 @@ $ releasedocmaker.py --project HBASE --version 1.0.0 --usetoday
 
 After using this option and release, don't forget to change JIRA's release date to match!
 
+# Sorted Output
+
+Different projects may find one type of sort better than another, depending upon their needs.  releasedocmaker supports two types of sorts and each provides two different options in the direction for that sort.
+
+## Resolution Date-base Sort
+
+By default, releasedocmaker will sort the output based upon the resolution date of the issue starting with older resolutions.  This is the same as giving these options:
+
+```bash
+$ releasedocmaker --sorttype=releasedate --sortorder=older
+```
+
+The order can be reversed so that newer issues appear on top by providing the 'newer' flag:
+
+```bash
+$ releasedocmaker --sorttype=releasedate --sortorder=newer
+```
+
+In the case of multiple projects given on the command line, the projects will be interspersed.
+
+## Issue Number-based Sort
+
+An alternative to the date-based sort is to sort based upon the issue id.  This may be accomplished via:
+
+```bash
+$ releasedocmaker --sorttype=issueid --sortorder=asc
+```
+
+This will now sort by the issue id, listing them in lowest to highest (or ascending) order.
+
+The order may be reversed to list them in highest to lowest (or descending) order by providing the appropriate flag:
+
+```bash
+$ releasedocmaker --sorttype=issueid --sortorder=dec
+```
+
+In the case of multiple projects given on the command line, the projects will be grouped and then sorted by issue id.
+
 # Lint Mode
 
 In order to ensure proper formatting while using mvn site, releasedocmaker puts in periods (.) for fields that are empty or unassigned.  This can be unsightly and not proper for any given project.  There are also other things, such as missing release notes for incompatible changes, that are less than desirable.

http://git-wip-us.apache.org/repos/asf/yetus/blob/e58875dd/release-doc-maker/releasedocmaker.py
----------------------------------------------------------------------
diff --git a/release-doc-maker/releasedocmaker.py b/release-doc-maker/releasedocmaker.py
index 07a1124..5f28a73 100755
--- a/release-doc-maker/releasedocmaker.py
+++ b/release-doc-maker/releasedocmaker.py
@@ -36,10 +36,16 @@ try:
 except NameError:
     from sets import Set as set
 
+import dateutil.parser
+
+
+
 RELEASE_VERSION = {}
 NAME_PATTERN = re.compile(r' \([0-9]+\)')
 RELNOTE_PATTERN = re.compile('^\<\!\-\- ([a-z]+) \-\-\>')
 JIRA_BASE_URL = "https://issues.apache.org/jira"
+SORTTYPE = 'resolutiondate'
+SORTORDER = 'older'
 
 ASF_LICENSE = '''
 <!---
@@ -98,13 +104,14 @@ def textsanitize(_str):
 # if release notes have a special marker,
 # we'll treat them as already in markdown format
 def processrelnote(_str):
-  fmt = RELNOTE_PATTERN.match(_str)
-  if fmt is None:
-      return textsanitize(_str)
-  else:
-      return {
-        'markdown' : markdownsanitize(_str),
-      }.get(fmt.group(1),textsanitize(_str))
+    fmt = RELNOTE_PATTERN.match(_str)
+    if fmt is None:
+        return textsanitize(_str)
+    else:
+        return {
+            'markdown': markdownsanitize(_str),
+        }.get(
+            fmt.group(1), textsanitize(_str))
 
 def mstr(obj):
     if obj is None:
@@ -260,17 +267,32 @@ class Jira(object):
         return mstr(ret)
 
     def __cmp__(self, other):
-        selfsplit = self.get_id().split('-')
-        othersplit = other.get_id().split('-')
-        result = cmp(selfsplit[0], othersplit[0])
-        if result != 0:
-            return result
-        else:
-            if selfsplit[1] < othersplit[1]:
-                return True
-            elif selfsplit[1] > othersplit[1]:
-                return False
-        return False
+        result = 0
+
+        if SORTTYPE == 'issueid':
+            # compare by issue name-number
+            selfsplit = self.get_id().split('-')
+            othersplit = other.get_id().split('-')
+            result = cmp(selfsplit[0], othersplit[0])
+            if result == 0:
+                result = cmp(int(selfsplit[1]), int(othersplit[1]))
+                if result != 0:
+                    if SORTORDER == 'dec':
+                        if result == 1:
+                            result = -1
+                        else:
+                            result = 1
+        elif SORTTYPE == 'resolutiondate':
+            dts = dateutil.parser.parse(self.fields['resolutiondate'])
+            dto = dateutil.parser.parse(other.fields['resolutiondate'])
+            result = cmp(dts, dto)
+            if result != 0:
+                if SORTORDER == 'newer':
+                    if result == 1:
+                        result = -1
+                    else:
+                        result = 1
+        return result
 
     def get_incompatible_change(self):
         if self.incompat is None:
@@ -398,21 +420,21 @@ class Outputs(object):
         if params is None:
             params = {}
         self.params = params
-        self.base = open(base_file_name%params, 'w')
+        self.base = open(base_file_name % params, 'w')
         self.others = {}
         for key in keys:
             both = dict(params)
             both['key'] = key
-            self.others[key] = open(file_name_pattern%both, 'w')
+            self.others[key] = open(file_name_pattern % both, 'w')
 
     def write_all(self, pattern):
         both = dict(self.params)
         both['key'] = ''
-        self.base.write(pattern%both)
+        self.base.write(pattern % both)
         for key in self.others.keys():
             both = dict(self.params)
             both['key'] = key
-            self.others[key].write(pattern%both)
+            self.others[key].write(pattern % both)
 
     def write_key_raw(self, key, _str):
         self.base.write(_str)
@@ -501,6 +523,10 @@ def parse_args():
                       help="projects in JIRA to include in releasenotes", metavar="PROJECT")
     parser.add_option("-r", "--range", dest="range", action="store_true",
                       default=False, help="Given versions are a range")
+    parser.add_option("--sortorder", dest="sortorder", type="string", metavar="TYPE",
+                      default=SORTORDER, help="Sorting order for sort type (default: %s)"%SORTORDER)
+    parser.add_option("--sorttype", dest="sorttype", type="string", metavar="TYPE",
+                      default=SORTTYPE, help="Sorting type for issues (default: %s)"%SORTTYPE)
     parser.add_option("-t", "--projecttitle", dest="title", type="string",
                       help="Title to use for the project (default is Apache PROJECT)")
     parser.add_option("-u", "--usetoday", dest="usetoday", action="store_true",
@@ -570,6 +596,11 @@ def main():
         versions = [Version(v) for v in options.versions]
     versions.sort()
 
+    global SORTTYPE
+    SORTTYPE = options.sorttype
+    global SORTORDER
+    SORTORDER = options.sortorder
+
     if options.title is None:
         title = projects[0]
     else:


[05/11] yetus git commit: YETUS-353. runtime wrapper for build driver

Posted by aw...@apache.org.
YETUS-353. runtime wrapper for build driver

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/7f0fea79
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/7f0fea79
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/7f0fea79

Branch: refs/heads/YETUS-156
Commit: 7f0fea79e364e0f1d7deb3341170a3db5841bbdb
Parents: 78154e1
Author: Allen Wittenauer <aw...@apache.org>
Authored: Tue Mar 29 17:12:43 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Sat Apr 9 09:23:50 2016 -0700

----------------------------------------------------------------------
 build.sh                | 4 +++-
 precommit/test-patch.sh | 8 +++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/7f0fea79/build.sh
----------------------------------------------------------------------
diff --git a/build.sh b/build.sh
index ebf2872..3fd24f7 100755
--- a/build.sh
+++ b/build.sh
@@ -167,11 +167,13 @@ cp -r shelldocs "${bin_tarball}/lib/"
 cp -r release-doc-maker "${bin_tarball}/lib/"
 
 cp -r precommit "${bin_tarball}/lib/"
+ln -s test-patch.sh "${bin_tarball}/lib/precommit/qbt.sh"
 
 mkdir -p "${bin_tarball}/bin"
 
 for utility in shelldocs/shelldocs.py release-doc-maker/releasedocmaker.py \
-               precommit/smart-apply-patch.sh precommit/test-patch.sh
+               precommit/smart-apply-patch.sh precommit/test-patch.sh \
+               precommit/qbt.sh
 do
   wrapper=${utility##*/}
   wrapper=${wrapper%.*}

http://git-wip-us.apache.org/repos/asf/yetus/blob/7f0fea79/precommit/test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index e01ee87..f4752b5 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -25,6 +25,8 @@ fi
 
 this="${BASH_SOURCE-$0}"
 BINDIR=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
+BINNAME=${this##*/}
+BINNAME=${BINNAME%.sh}
 STARTINGDIR=$(pwd)
 USER_PARAMS=("$@")
 GLOBALTIMER=$(date +"%s")
@@ -2995,7 +2997,11 @@ function import_core
 
 import_core
 
-initialize "$@"
+if [[ "${BINNAME}" =~ qbt ]]; then
+  initialize --empty-patch "$@"
+else
+  initialize "$@"
+fi
 
 prechecks
 


[03/11] yetus git commit: YETUS-361. Use Google's pylintrc file.

Posted by aw...@apache.org.
YETUS-361. Use Google's pylintrc file.

Signed-off-by: Sean Busbey <bu...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/26aef268
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/26aef268
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/26aef268

Branch: refs/heads/YETUS-156
Commit: 26aef2689018894dc5b2289cb5c064497ef921d8
Parents: 56cc463
Author: Andrew Wang <an...@cloudera.com>
Authored: Wed Mar 30 12:50:54 2016 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Apr 1 22:48:26 2016 -0500

----------------------------------------------------------------------
 .pylintrc | 301 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 301 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/26aef268/.pylintrc
----------------------------------------------------------------------
diff --git a/.pylintrc b/.pylintrc
index ba7ab9a..b4cc79a 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -1,4 +1,305 @@
+[MASTER]
+
+# Specify a configuration file.
+#rcfile=
+
+# Python code to execute, usually for sys.path manipulation such as
+# pygtk.require().
+#init-hook=
+
+# Profiled execution.
+#profile=no
+
+# Add files or directories to the blacklist. They should be base names, not
+# paths.
+ignore=CVS
+
+# Pickle collected data for later comparisons.
+persistent=yes
+
+# List of plugins (as comma separated values of python modules names) to load,
+# usually to register additional checkers.
+load-plugins=
+
+
+[MESSAGES CONTROL]
+
+# Enable the message, report, category or checker with the given id(s). You can
+# either give multiple identifier separated by comma (,) or put this option
+# multiple time.
+#enable=
+
+# Disable the message, report, category or checker with the given id(s). You
+# can either give multiple identifier separated by comma (,) or put this option
+# multiple time (only on the command line, not in the configuration file where
+# it should appear only once).
+# CHANGED:
+# C0103: Invalid name ""
+# C0111: Missing docstring
+# C0302: Too many lines in module (N)
+# I0010: Unable to consider inline option ''
+# I0011: Locally disabling WNNNN
+#
+# R0801: Similar lines in N files
+# R0901: Too many ancestors (8/7)
+# R0902: Too many instance attributes (N/7)
+# R0903: Too few public methods (N/2)
+# R0904: Too many public methods (N/20)
+# R0911: Too many return statements (N/6)
+# R0912: Too many branches (N/12)
+# R0913: Too many arguments (N/5)
+# R0914: Too many local variables (N/15)
+# R0915: Too many statements (N/50)
+# R0921: Abstract class not referenced
+# R0922: Abstract class is only referenced 1 times
+# W0122: Use of the exec statement
+# W0141: Used builtin function ''
+# W0142: Used * or ** magic
+# W0402: Uses of a deprecated module 'string'
+# W0404: 41: Reimport 'XX' (imported line NN)
+# W0511: TODO
+# W0603: Using the global statement
+# W0703: Catch "Exception"
+# W1201: Specify string format arguments as logging function parameters
+#
+# These should get enabled, but the codebase has too many violations currently.
+# bad-continuation
+# anomalous-backslash-in-string
+# bad-context-manager
+# bad-indentation
+# bad-str-strip-call
+# bad-whitespace
+# cell-var-from-loop
+# deprecated-lambda
+# eval-used
+# function-redefined
+# import-error
+# locally-enabled
+# missing-final-newline
+# no-init
+# no-name-in-module
+# no-self-use
+# not-callable
+# old-style-class
+# protected-access
+# superfluous-parens
+# super-on-old-class
+# too-many-function-args
+# trailing-whitespace
+# unnecessary-semicolon
+# unpacking-non-sequence
+# unused-import
+# useless-else-on-loop
+disable=C0103,C0111,C0302,I0010,I0011,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,W0122,W0141,W0142,W0402,W0404,W0511,W0603,W0703,W1201,bad-continuation,anomalous-backslash-in-string,bad-context-manager,bad-indentation,bad-str-strip-call,bad-whitespace,cell-var-from-loop,deprecated-lambda,eval-used,function-redefined,import-error,locally-enabled,missing-final-newline,no-init,no-name-in-module,no-self-use,not-callable,old-style-class,protected-access,superfluous-parens,super-on-old-class,too-many-function-args,trailing-whitespace,unnecessary-semicolon,unpacking-non-sequence,unused-import,useless-else-on-loop
+
+
+[REPORTS]
+
+# Set the output format. Available formats are text, parseable, colorized, msvs
+# (visual studio) and html
+output-format=text
+
+# Put messages in a separate file for each module / package specified on the
+# command line instead of printing them on stdout. Reports (if any) will be
+# written in a file name "pylint_global.[txt|html]".
+files-output=no
+
+# Tells whether to display a full report or only the messages
+# CHANGED:
+reports=no
+
+# Python expression which should return a note less than 10 (10 is the highest
+# note). You have access to the variables errors warning, statement which
+# respectively contain the number of errors / warnings messages and the total
+# number of statements analyzed. This is used by the global evaluation report
+# (RP0004).
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
+
+# Add a comment according to your evaluation note. This is used by the global
+# evaluation report (RP0004).
+#comment=no
+
+
+[VARIABLES]
+
+# Tells whether we should check for unused import in __init__ files.
+init-import=no
+
+# A regular expression matching the beginning of the name of dummy variables
+# (i.e. not used).
+dummy-variables-rgx=_|dummy
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid to define new builtins when possible.
+additional-builtins=
+
+
+[TYPECHECK]
+
+# Tells whether missing members accessed in mixin class should be ignored. A
+# mixin class is detected if its name ends with "mixin" (case insensitive).
+ignore-mixin-members=yes
+
+# List of classes names for which member attributes should not be checked
+# (useful for classes with attributes dynamically set).
+ignored-classes=SQLObject,twisted.internet.reactor,hashlib,google.appengine.api.memcache
+
+# When zope mode is activated, add a predefined set of Zope acquired attributes
+# to generated-members.
+#zope=no
+
+# List of members which are set dynamically and missed by pylint inference
+# system, and so shouldn't trigger E0201 when accessed. Python regular
+# expressions are accepted.
+generated-members=REQUEST,acl_users,aq_parent,multiprocessing.managers.SyncManager
+
+
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+notes=FIXME,XXX,TODO
+
+
+[SIMILARITIES]
+
+# Minimum lines number of a similarity.
+min-similarity-lines=4
+
+# Ignore comments when computing similarities.
+ignore-comments=yes
+
+# Ignore docstrings when computing similarities.
+ignore-docstrings=yes
+
+
 [FORMAT]
 
 # Maximum number of characters on a single line.
 max-line-length=100
+
+# Maximum number of lines in a module
+max-module-lines=1000
+
+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
+# tab).
+# CHANGED:
+indent-string='  '
+
+
+[BASIC]
+
+# Required attributes for module, separated by a comma
+#required-attributes=
+
+# List of builtins function names that should not be used, separated by a comma
+bad-functions=map,filter,apply,input
+
+# Regular expression which should only match correct module names
+module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Regular expression which should only match correct module level names
+const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
+
+# Regular expression which should only match correct class names
+class-rgx=[A-Z_][a-zA-Z0-9]+$
+
+# Regular expression which should only match correct function names
+function-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct method names
+method-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct instance attribute names
+attr-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct argument names
+argument-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct variable names
+variable-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match correct list comprehension /
+# generator expression variable names
+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
+
+# Good variable names which should always be accepted, separated by a comma
+good-names=i,j,k,ex,Run,_
+
+# Bad variable names which should always be refused, separated by a comma
+bad-names=foo,bar,baz,toto,tutu,tata
+
+# Regular expression which should only match functions or classes name which do
+# not require a docstring
+no-docstring-rgx=__.*__
+
+
+[DESIGN]
+
+# Maximum number of arguments for function / method
+max-args=5
+
+# Argument names that match this expression will be ignored. Default to name
+# with leading underscore
+ignored-argument-names=_.*
+
+# Maximum number of locals for function / method body
+max-locals=15
+
+# Maximum number of return / yield for function / method body
+max-returns=6
+
+# Maximum number of branch for function / method body
+max-branchs=12
+
+# Maximum number of statements in function / method body
+max-statements=50
+
+# Maximum number of parents for a class (see R0901).
+max-parents=7
+
+# Maximum number of attributes for a class (see R0902).
+max-attributes=7
+
+# Minimum number of public methods for a class (see R0903).
+min-public-methods=2
+
+# Maximum number of public methods for a class (see R0904).
+max-public-methods=20
+
+
+[CLASSES]
+
+# List of interface methods to ignore, separated by a comma. This is used for
+# instance to not check methods defines in Zope's Interface base class.
+#ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
+
+# List of method names used to declare (i.e. assign) instance attributes.
+defining-attr-methods=__init__,__new__,setUp
+
+# List of valid names for the first argument in a class method.
+valid-classmethod-first-arg=cls
+
+
+[IMPORTS]
+
+# Deprecated modules which should not be used, separated by a comma
+deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
+
+# Create a graph of every (i.e. internal and external) dependencies in the
+# given file (report RP0402 must not be disabled)
+import-graph=
+
+# Create a graph of external dependencies in the given file (report RP0402 must
+# not be disabled)
+ext-import-graph=
+
+# Create a graph of internal dependencies in the given file (report RP0402 must
+# not be disabled)
+int-import-graph=
+
+
+[EXCEPTIONS]
+
+# Exceptions that will emit a warning when being caught. Defaults to
+# "Exception"
+overgeneral-exceptions=Exception


[09/11] yetus git commit: YETUS-351. documentation changes for build driver

Posted by aw...@apache.org.
YETUS-351. documentation changes for build driver

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/87c70ab8
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/87c70ab8
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/87c70ab8

Branch: refs/heads/YETUS-156
Commit: 87c70ab87d41d67f89aeccff464b5372e683e291
Parents: 7f0fea7
Author: Allen Wittenauer <aw...@apache.org>
Authored: Tue Mar 29 17:19:41 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Sat Apr 9 09:23:50 2016 -0700

----------------------------------------------------------------------
 .../documentation/in-progress/precommit-qbt.md  | 37 ++++++++++++++++++++
 1 file changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/87c70ab8/asf-site-src/source/documentation/in-progress/precommit-qbt.md
----------------------------------------------------------------------
diff --git a/asf-site-src/source/documentation/in-progress/precommit-qbt.md b/asf-site-src/source/documentation/in-progress/precommit-qbt.md
new file mode 100644
index 0000000..2cb8036
--- /dev/null
+++ b/asf-site-src/source/documentation/in-progress/precommit-qbt.md
@@ -0,0 +1,37 @@
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+qbt
+===
+
+`qbt` is a command to execute test-patch without a patch.  It uses
+the same plug-ins and the same options as test-patch.  The only
+difference is that no patch file, location, etc should be supplied.
+It is meant to be a way to easily get test-patch's output on your
+current source tree.  It is suitable to be run as a regularly
+scheduled build as part of your overall development strategy.
+
+When using an automation tool, it may be useful to use the
+`--console-report-file` option to send the summary email to a
+file. This can then be used with systems like Jenkin's
+email-ext plug-in to send the output as an emailed report:
+
+```
+${FILE,path="<report-file-path>"}
+```


[10/11] yetus git commit: YETUS-349. core engine changes for build driver

Posted by aw...@apache.org.
YETUS-349. core engine changes for build driver

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/a2b67a8e
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/a2b67a8e
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/a2b67a8e

Branch: refs/heads/YETUS-156
Commit: a2b67a8eeee7b0c5b0e6a864bac8ab21560a48b1
Parents: e2d17dc
Author: Allen Wittenauer <aw...@apache.org>
Authored: Tue Mar 29 16:30:27 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Sat Apr 9 09:23:50 2016 -0700

----------------------------------------------------------------------
 precommit/core.d/01-common.sh |  22 +++++
 precommit/test-patch.sh       | 163 ++++++++++++++++++++++++-------------
 2 files changed, 130 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/a2b67a8e/precommit/core.d/01-common.sh
----------------------------------------------------------------------
diff --git a/precommit/core.d/01-common.sh b/precommit/core.d/01-common.sh
index 0661f6e..f31d613 100755
--- a/precommit/core.d/01-common.sh
+++ b/precommit/core.d/01-common.sh
@@ -536,6 +536,9 @@ function verify_command
     yetus_error "executable for '${cmd_name}' was not specified."
     return 1
   fi
+  if [[ ! "${cmd_path}" =~ / ]]; then
+    cmd_path=$(command -v "${cmd_path}")
+  fi
   if [[ ! -f ${cmd_path} ]]; then
     yetus_error "executable '${cmd_path}' for '${cmd_name}' does not exist."
     return 1
@@ -546,3 +549,22 @@ function verify_command
   fi
   return 0
 }
+
+## @description  Faster dirname, given the assumption that
+## @description  dirs are always absolute (e.g., start with /)
+## @description  DO NOT USE with relative paths or where
+## @description  assumption may not be valid!
+## @audience     private
+## @stability    evolving
+## @replaceable  no
+## @param        fileobj
+function faster_dirname
+{
+  declare o=$1
+
+  if [[ "${o}" =~ / ]]; then
+    echo "${o%/*}"
+  else
+    echo .
+  fi
+}

http://git-wip-us.apache.org/repos/asf/yetus/blob/a2b67a8e/precommit/test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index e0dbc29..e01ee87 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -86,6 +86,9 @@ function setup_defaults
   CHANGED_UNION_MODULES=""
   REEXECED=false
   RESETREPO=false
+  BUILDMODE=patch
+  # shellcheck disable=SC2034
+  BUILDMODEMSG="The patch"
   ISSUE=""
   TIMER=$(date +"%s")
   BUILDTOOL=maven
@@ -659,10 +662,14 @@ function yetus_usage
   jdktlist=$(echo ${JDK_TEST_LIST})
   jdktlist=${jdktlist// /,}
 
-  echo "test-patch.sh [OPTIONS] patch"
-  echo ""
-  echo "Where:"
-  echo "  patch is a file, URL, or bugsystem-compatible location of the patch file"
+  if [[ "${BUILDMODE}" = patch ]]; then
+    echo "${BINNAME} [OPTIONS] patch"
+    echo ""
+    echo "Where:"
+    echo "  patch is a file, URL, or bugsystem-compatible location of the patch file"
+  else
+    echo "${BINNAME} [OPTIONS]"
+  fi
   echo ""
   echo "Options:"
   echo ""
@@ -676,6 +683,7 @@ function yetus_usage
   yetus_add_option "--contrib-guide=<url>" "URL to point new users towards project conventions. (default: ${PATCH_NAMING_RULE} )"
   yetus_add_option "--debug" "If set, then output some extra stuff to stderr"
   yetus_add_option "--dirty-workspace" "Allow the local git workspace to have uncommitted changes"
+  yetus_add_option "--empty-patch" "Create a summary of the current source tree"
   yetus_add_option "--java-home=<path>" "Set JAVA_HOME (In Docker mode, this should be local to the image)"
   yetus_add_option "--linecomments=<bug>" "Only write line comments to this comma delimited list (defaults to bugcomments)"
   yetus_add_option "--list-plugins" "List all installed plug-ins and then exit"
@@ -800,6 +808,11 @@ function parse_args
       --instance=*)
         INSTANCE=${i#*=}
       ;;
+      --empty-patch)
+        BUILDMODE=full
+        # shellcheck disable=SC2034
+        BUILDMODEMSG="The source tree"
+      ;;
       --java-home=*)
         JAVA_HOME=${i#*=}
       ;;
@@ -890,7 +903,8 @@ function parse_args
 
   docker_parse_args "$@"
 
-  if [[ -z "${PATCH_OR_ISSUE}" ]]; then
+  if [[ -z "${PATCH_OR_ISSUE}"
+       && "${BUILDMODE}" = patch ]]; then
     yetus_usage
     exit 1
   fi
@@ -1009,7 +1023,7 @@ function find_buildfile_dir
       yetus_debug "ERROR: ${buildfile} is not found."
       return 1
     else
-      dir=$(dirname "${dir}")
+      dir=$(faster_dirname "${dir}")
     fi
   done
 }
@@ -1022,17 +1036,29 @@ function find_buildfile_dir
 function find_changed_files
 {
   declare line
+  declare oldifs
 
-  # get a list of all of the files that have been changed,
-  # except for /dev/null (which would be present for new files).
-  # Additionally, remove any a/ b/ patterns at the front of the patch filenames.
-  # shellcheck disable=SC2016
-  while read -r line; do
-    CHANGED_FILES=("${CHANGED_FILES[@]}" "${line}")
-  done < <(
-    ${AWK} 'function p(s){sub("^[ab]/","",s); if(s!~"^/dev/null"){print s}}
-    /^diff --git /   { p($3); p($4) }
-    /^(\+\+\+|---) / { p($2) }' "${PATCH_DIR}/patch" | sort -u)
+  case "${BUILDMODE}" in
+    full)
+      echo "Building a list of all files in the source tree"
+      oldifs=${IFS}
+      IFS=$'\n'
+      CHANGED_FILES=($(git ls-files))
+      IFS=${oldifs}
+    ;;
+    patch)
+      # get a list of all of the files that have been changed,
+      # except for /dev/null (which would be present for new files).
+      # Additionally, remove any a/ b/ patterns at the front of the patch filenames.
+      # shellcheck disable=SC2016
+      while read -r line; do
+        CHANGED_FILES=("${CHANGED_FILES[@]}" "${line}")
+      done < <(
+        ${AWK} 'function p(s){sub("^[ab]/","",s); if(s!~"^/dev/null"){print s}}
+        /^diff --git /   { p($3); p($4) }
+        /^(\+\+\+|---) / { p($2) }' "${PATCH_DIR}/patch" | sort -u)
+      ;;
+    esac
 }
 
 ## @description Check for directories to skip during
@@ -1065,7 +1091,7 @@ function module_skipdir
     if [[ ${dir} == "." || ${dir} == "/" ]]; then
       return 0
     else
-      dir=$(dirname "${dir}")
+      dir=$(faster_dirname "${dir}")
       yetus_debug "Trying to skip: ${dir}"
     fi
   done
@@ -1102,8 +1128,15 @@ function find_changed_modules
   if [[ -z ${buildfile} ]]; then
     tmpmods=(".")
   else
+
     # Now find all the modules that were changed
     for i in "${CHANGED_FILES[@]}"; do
+
+      # TODO: optimize this
+      if [[ "${BUILDMODE}" = full && ! "${i}" =~ ${buildfile} ]]; then
+        continue
+      fi
+
       dirt=$(dirname "${i}")
 
       module_skipdir "${dirt}"
@@ -1272,8 +1305,10 @@ function git_checkout
 
     currentbranch=$(${GIT} rev-parse --abbrev-ref HEAD)
     if [[ "${currentbranch}" != "${PATCH_BRANCH}" ]];then
-      echo "WARNING: Current git branch is ${currentbranch} but patch is built for ${PATCH_BRANCH}."
-      echo "WARNING: Continuing anyway..."
+      if [[ "${BUILDMODE}" = patch ]]; then
+        echo "WARNING: Current git branch is ${currentbranch} but patch is built for ${PATCH_BRANCH}."
+        echo "WARNING: Continuing anyway..."
+      fi
       PATCH_BRANCH=${currentbranch}
     fi
   fi
@@ -1398,8 +1433,11 @@ function determine_issue
 ## @replaceable  no
 function determine_needed_tests
 {
-  local i
-  local plugin
+  declare i
+  declare plugin
+
+  big_console_header "Determining needed tests"
+  echo "(Depending upon input size and number of plug-ins, this may take a while)"
 
   for i in "${CHANGED_FILES[@]}"; do
     yetus_debug "Determining needed tests for ${i}"
@@ -1592,7 +1630,7 @@ function check_reexec
     fi
   done
 
-  if [[ ${copy} == true ]]; then
+  if [[ ${copy} == true && "${BUILDMODE}" != full ]]; then
     big_console_header "precommit patch detected"
 
     if [[ ${RESETREPO} == false ]]; then
@@ -1709,8 +1747,10 @@ function modules_messages
   declare statusjdk
   declare multijdkmode=false
 
-  if [[ ${repostatus} == branch ]]; then
+  if [[ "${repostatus}" == branch ]]; then
     repo=${PATCH_BRANCH}
+  elif [[ "${BUILDMODE}" == full ]]; then
+    repo="the source"
   else
     repo="the patch"
   fi
@@ -2351,12 +2391,16 @@ function generic_calcdiff_status
   ((samepatch=numpatch-addpatch))
   ((fixedpatch=numbranch-numpatch+addpatch))
 
-  printf "generated %i new + %i unchanged - %i fixed = %i total (was %i)" \
-    "${addpatch}" \
-    "${samepatch}" \
-    "${fixedpatch}" \
-    "${numpatch}" \
-    "${numbranch}"
+  if [[ "${BUILDMODE}" = full ]]; then
+    printf "has %i issues." "${addpatch}"
+  else
+    printf "generated %i new + %i unchanged - %i fixed = %i total (was %i)" \
+      "${addpatch}" \
+      "${samepatch}" \
+      "${fixedpatch}" \
+      "${numpatch}" \
+      "${numbranch}"
+  fi
 }
 
 ## @description  Helper routine for plugins to ask projects, etc
@@ -2562,7 +2606,7 @@ function generic_post_handler
     return 0
   fi
 
-  big_console_header "Patch ${testtype} verification"
+  big_console_header "${testtype} verification: ${BUILDMODE}"
 
   for jdkindex in ${JDK_DIR_LIST}; do
     if [[ ${multijdkmode} == true ]]; then
@@ -2683,9 +2727,9 @@ function compile
   fi
 
   if [[ ${codebase} = "branch" ]]; then
-    big_console_header "Pre-patch ${PATCH_BRANCH} compilation"
+    big_console_header "${PATCH_BRANCH} compilation: pre-patch"
   else
-    big_console_header "Patch compilation"
+    big_console_header "${PATCH_BRANCH} compilation: ${BUILDMODE}"
   fi
 
   yetus_debug "Is JVM Required? ${JVM_REQUIRED}"
@@ -2858,26 +2902,33 @@ function initialize
 
   echo "Modes: ${EXEC_MODES}"
 
-  locate_patch
+  if [[ "${BUILDMODE}" = patch ]]; then
+    locate_patch
+
+    # from here on out, we'll be in ${BASEDIR} for cwd
+    # plugins need to pushd/popd if they change.
+    git_checkout
 
-  # from here on out, we'll be in ${BASEDIR} for cwd
-  # plugins need to pushd/popd if they change.
-  git_checkout
+    determine_issue
+    if [[ "${ISSUE}" == 'Unknown' ]]; then
+      echo "Testing patch on ${PATCH_BRANCH}."
+    else
+      echo "Testing ${ISSUE} patch on ${PATCH_BRANCH}."
+    fi
+
+    patchfile_dryrun_driver "${PATCH_DIR}/patch"
+    if [[ $? != 0 ]]; then
+      ((RESULT = RESULT + 1))
+      yetus_error "ERROR: ${PATCH_OR_ISSUE} does not apply to ${PATCH_BRANCH}."
+      add_vote_table -1 patch "${PATCH_OR_ISSUE} does not apply to ${PATCH_BRANCH}. Rebase required? Wrong Branch? See ${PATCH_NAMING_RULE} for help."
+      bugsystem_finalreport 1
+      cleanup_and_exit 1
+    fi
 
-  determine_issue
-  if [[ "${ISSUE}" == 'Unknown' ]]; then
-    echo "Testing patch on ${PATCH_BRANCH}."
   else
-    echo "Testing ${ISSUE} patch on ${PATCH_BRANCH}."
-  fi
 
-  patchfile_dryrun_driver "${PATCH_DIR}/patch"
-  if [[ $? != 0 ]]; then
-    ((RESULT = RESULT + 1))
-    yetus_error "ERROR: ${PATCH_OR_ISSUE} does not apply to ${PATCH_BRANCH}."
-    add_vote_table -1 patch "${PATCH_OR_ISSUE} does not apply to ${PATCH_BRANCH}. Rebase required? Wrong Branch? See ${PATCH_NAMING_RULE} for help."
-    bugsystem_finalreport 1
-    cleanup_and_exit 1
+    git_checkout
+
   fi
 
   find_changed_files
@@ -2948,17 +2999,19 @@ initialize "$@"
 
 prechecks
 
-patchfiletests
-((RESULT=RESULT+$?))
+if [[ "${BUILDMODE}" = patch ]]; then
+  patchfiletests
+  ((RESULT=RESULT+$?))
 
-compile_cycle branch
-((RESULT=RESULT+$?))
+  compile_cycle branch
+  ((RESULT=RESULT+$?))
 
-distclean
+  distclean
 
-apply_patch_file
+  apply_patch_file
 
-compute_gitdiff
+  compute_gitdiff
+fi
 
 compile_cycle patch
 ((RESULT=RESULT+$?))


[08/11] yetus git commit: YETUS-350. plug-in changes for build driver

Posted by aw...@apache.org.
YETUS-350. plug-in changes for build driver

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/78154e1e
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/78154e1e
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/78154e1e

Branch: refs/heads/YETUS-156
Commit: 78154e1ee99dab97cefb2fdd8a7b69f3c02c9162
Parents: a2b67a8
Author: Allen Wittenauer <aw...@apache.org>
Authored: Tue Mar 29 16:57:57 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Sat Apr 9 09:23:50 2016 -0700

----------------------------------------------------------------------
 precommit/test-patch.d/asflicense.sh |  8 ++--
 precommit/test-patch.d/author.sh     | 74 +++++++++++++++++++++++++------
 precommit/test-patch.d/autoconf.sh   | 14 +++---
 precommit/test-patch.d/checkstyle.sh | 25 +++++------
 precommit/test-patch.d/cmake.sh      |  4 +-
 precommit/test-patch.d/findbugs.sh   | 15 ++++---
 precommit/test-patch.d/gradle.sh     |  4 +-
 precommit/test-patch.d/maven.sh      | 32 +++++++++----
 precommit/test-patch.d/perlcritic.sh |  8 ++--
 precommit/test-patch.d/pylint.sh     | 12 ++---
 precommit/test-patch.d/rubocop.sh    |  8 ++--
 precommit/test-patch.d/ruby-lint.sh  |  8 ++--
 precommit/test-patch.d/shellcheck.sh |  8 ++--
 precommit/test-patch.d/shelldocs.sh  |  8 ++--
 precommit/test-patch.d/test4tests.sh |  4 ++
 precommit/test-patch.d/whitespace.sh | 38 +++++++++++-----
 precommit/test-patch.d/xml.sh        |  6 +--
 17 files changed, 177 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/asflicense.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/asflicense.sh b/precommit/test-patch.d/asflicense.sh
index edf7a7f..593e4af 100755
--- a/precommit/test-patch.d/asflicense.sh
+++ b/precommit/test-patch.d/asflicense.sh
@@ -61,7 +61,7 @@ function asflicense_tests
   local numpatch
   local btfails=true
 
-  big_console_header "Determining number of patched ASF License errors"
+  big_console_header "Determining number of ASF License errors"
 
   start_clock
 
@@ -105,7 +105,7 @@ function asflicense_tests
   # RAT fails the build if there are license problems.
   # so let's take advantage of that a bit.
   if [[ $? == 0 && ${btfails} = true ]]; then
-    add_vote_table 1 asflicense "Patch does not generate ASF License warnings."
+    add_vote_table 1 asflicense "${BUILDMODEMSG} does not generate ASF License warnings."
     return 0
   fi
 
@@ -134,7 +134,7 @@ function asflicense_tests
   echo "There appear to be ${numpatch} ASF License warnings after applying the patch."
   if [[ -n ${numpatch}
      && ${numpatch} -gt 0 ]] ; then
-    add_vote_table -1 asflicense "Patch generated ${numpatch} ASF License warnings."
+    add_vote_table -1 asflicense "${BUILDMODEMSG} generated ${numpatch} ASF License warnings."
 
     echo "Lines that start with ????? in the ASF License "\
         "report indicate files that do not have an Apache license header:" \
@@ -146,7 +146,7 @@ function asflicense_tests
     add_footer_table asflicense "@@BASE@@/patch-asflicense-problems.txt"
     return 1
   fi
-  add_vote_table 1 asflicense "Patch does not generate ASF License warnings."
+  add_vote_table 1 asflicense "${BUILDMODEMSG} does not generate ASF License warnings."
   return 0
 }
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/author.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/author.sh b/precommit/test-patch.d/author.sh
index 4497d03..2e148d8 100755
--- a/precommit/test-patch.d/author.sh
+++ b/precommit/test-patch.d/author.sh
@@ -16,21 +16,50 @@
 
 add_test_type author
 
-## @description  Check the current directory for @author tags
+## @description  helper function for @author tags check
 ## @audience     private
 ## @stability    evolving
 ## @replaceable  no
 ## @return       0 on success
 ## @return       1 on failure
+function author_generic
+{
+  declare authortags
+  declare i
+
+  # shellcheck disable=SC2016
+  authortags=$(wc -l "${PATCH_DIR}/author-tags.txt" | "${AWK}" '{print $1}')
+  echo "There appear to be ${authortags} @author tags in the patch."
+  if [[ ${authortags} != 0 ]] ; then
+    add_vote_table -1 @author \
+      "${BUILDMODEMSG} appears to contain ${authortags} @author tags which the" \
+      " community has agreed to not allow in code contributions."
+    add_footer_table @author "@@BASE@@/author-tags.txt"
+    return 1
+  fi
+  add_vote_table +1 @author "${BUILDMODEMSG} does not contain any @author tags."
+  return 0
+}
+
+## @description  Check the current patchfile for @author tags
+## @audience     private
+## @stability    evolving
+## @replaceable  no
+## @return       0 on success
+## @return       1 on failure
+## @param        patchfile
 function author_patchfile
 {
   declare patchfile=$1
-  declare authorTags
   # shellcheck disable=SC2155
   declare -r appname=$(basename "${BASH_SOURCE-$0}")
   declare i
 
-  big_console_header "Checking there are no @author tags in the patch."
+  if [[ "${BUILDMODE}" != patch ]]; then
+    return
+  fi
+
+  big_console_header "Checking for @author tags: ${BUILDMODE}"
 
   start_clock
 
@@ -43,16 +72,33 @@ function author_patchfile
   done
 
   ${GREP} -i -n '^[^-].*@author' "${patchfile}" >> "${PATCH_DIR}/author-tags.txt"
-  # shellcheck disable=SC2016
-  authorTags=$(wc -l "${PATCH_DIR}/author-tags.txt" | "${AWK}" '{print $1}')
-  echo "There appear to be ${authorTags} @author tags in the patch."
-  if [[ ${authorTags} != 0 ]] ; then
-    add_vote_table -1 @author \
-      "The patch appears to contain ${authorTags} @author tags which the" \
-      " community has agreed to not allow in code contributions."
-    add_footer_table @author "@@BASE@@/author-tags.txt"
-    return 1
+  author_generic
+}
+
+
+## @description  Check the current directory for @author tags
+## @audience     private
+## @stability    evolving
+## @replaceable  no
+## @return       0 on success
+## @return       1 on failure
+function author_postcompile
+{
+  # shellcheck disable=SC2155
+  declare -r appname=$(basename "${BASH_SOURCE-$0}")
+  declare i
+
+  if [[ "${BUILDMODE}" != full ]]; then
+    return
   fi
-  add_vote_table +1 @author "The patch does not contain any @author tags."
-  return 0
+
+  big_console_header "Checking for @author tags: ${BUILDMODE}"
+
+  start_clock
+
+  "${GIT}" grep -n -I --extended-regexp -i '^[^-].*@author' \
+    | ${GREP} -v "${appname}" \
+    >> "${PATCH_DIR}/author-tags.txt"
+
+  author_generic
 }

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/autoconf.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/autoconf.sh b/precommit/test-patch.d/autoconf.sh
index 2937e72..933a8c0 100755
--- a/precommit/test-patch.d/autoconf.sh
+++ b/precommit/test-patch.d/autoconf.sh
@@ -91,9 +91,9 @@ function autoconf_precompile
   fi
 
   if [[ "${repostatus}" = branch ]]; then
-    big_console_header "Pre-patch ${PATCH_BRANCH} autoconf verification"
+    big_console_header "autoconf verification: ${PATCH_BRANCH}"
   else
-    big_console_header "Patch autoconf verification"
+    big_console_header "autoconf verification: ${BUILDMODE}"
   fi
 
   personality_modules "${repostatus}" autoreconf
@@ -108,7 +108,7 @@ function autoconf_precompile
       # shellcheck disable=SC2153
       add_vote_table -1 autoreconf "${PATCH_BRANCH} unable to autoreconf"
     else
-      add_vote_table -1 autoreconf "${repostatus} unable to autoreconf"
+      add_vote_table -1 autoreconf "${BUILDMODEMSG} is unable to autoreconf"
     fi
     add_footer_table "autoreconf" "@@BASE@@/${repostatus}-autoconf-autoreconf"
     return 1
@@ -117,7 +117,7 @@ function autoconf_precompile
       # shellcheck disable=SC2153
       add_vote_table +1 autoreconf "${PATCH_BRANCH} autoreconf successful"
     else
-      add_vote_table +1 autoreconf "${repostatus} autoreconf successful"
+      add_vote_table +1 autoreconf "${BUILDMODEMSG} can autoreconf"
     fi
   fi
 
@@ -138,7 +138,7 @@ function autoconf_precompile
       # shellcheck disable=SC2153
       add_vote_table -1 configure "${PATCH_BRANCH} unable to configure"
     else
-      add_vote_table -1 configure "${repostatus} unable to configure"
+      add_vote_table -1 configure "${BUILDMODEMSG} is unable to configure"
     fi
     add_footer_table "configure" "@@BASE@@/${repostatus}-autoconf-configure"
     return 1
@@ -147,7 +147,7 @@ function autoconf_precompile
       # shellcheck disable=SC2153
       add_vote_table +1 configure "${PATCH_BRANCH} configure successful"
     else
-      add_vote_table +1 configure "${repostatus} configure successful"
+      add_vote_table +1 configure "${BUILDMODEMSG} can configure"
     fi
   fi
   return 0
@@ -201,4 +201,4 @@ function autoconf_builtin_personality_file_tests
   else
     make_builtin_personality_file_tests "${filename}"
   fi
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/checkstyle.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/checkstyle.sh b/precommit/test-patch.d/checkstyle.sh
index 4363e4d..bba3369 100755
--- a/precommit/test-patch.d/checkstyle.sh
+++ b/precommit/test-patch.d/checkstyle.sh
@@ -140,7 +140,6 @@ function checkstyle_runner
   declare savestop
   declare output
   declare logfile
-  declare repo
   declare modulesuffix
   declare cmd
   declare logline
@@ -151,12 +150,6 @@ function checkstyle_runner
   # first, let's clear out any previous run information
   modules_reset
 
-  if [[ ${repostatus} == branch ]]; then
-    repo=${PATCH_BRANCH}
-  else
-    repo="the patch"
-  fi
-
   # loop through the modules we've been given
   #shellcheck disable=SC2153
   until [[ $i -eq ${#MODULE[@]} ]]; do
@@ -200,14 +193,14 @@ function checkstyle_runner
       > "${tmp}"
 
     if [[ $? == 0 ]] ; then
-      module_status ${i} +1 "${logfile}" "${modulesuffix} in ${repo} passed checkstyle"
+      module_status ${i} +1 "${logfile}" "${BUILDMODEMSG} ${modulesuffix} passed checkstyle"
     else
-      module_status ${i} -1 "${logfile}" "${modulesuffix} in ${repo} failed checkstyle"
+      module_status ${i} -1 "${logfile}" "${BUILDMODEMSG} ${modulesuffix} failed checkstyle"
       ((result = result + 1))
     fi
 
     # if we have some output, we need to do more work:
-    if [[ -s ${tmp} ]]; then
+    if [[ -s ${tmp} && "${BUILDMODE}" = patch ]]; then
 
       # first, let's pull out all of the files that
       # we actually care about, esp since that run
@@ -219,6 +212,7 @@ function checkstyle_runner
         ${GREP} "${j}" "${tmp}" >> "${tmp}.1"
       done
 
+
       # now that we have just the files we care about,
       # let's unscrew it. You see...
 
@@ -248,7 +242,8 @@ function checkstyle_runner
       popd >/dev/null
       # later on, calcdiff will turn this into code(:column):error
       # compare, and then put the file:line back onto it.
-
+    else
+      cp -p "${tmp}" "${output}"
     fi
 
     rm "${tmp}" "${tmp}.1" 2>/dev/null
@@ -288,7 +283,7 @@ function checkstyle_preapply
     return 0
   fi
 
-  big_console_header "${PATCH_BRANCH} checkstyle"
+  big_console_header "checkstyle: ${PATCH_BRANCH}"
 
   start_clock
 
@@ -321,7 +316,7 @@ function checkstyle_postapply
     return 0
   fi
 
-  big_console_header "Patch checkstyle plugin"
+  big_console_header "checkstyle: ${BUILDMODE}"
 
   start_clock
 
@@ -371,9 +366,9 @@ function checkstyle_postapply
 
     if [[ ${addpatch} -gt 0 ]] ; then
       ((result = result + 1))
-      module_status ${i} -1 "diff-checkstyle-${fn}.txt" "${mod}: patch ${statstring}"
+      module_status ${i} -1 "diff-checkstyle-${fn}.txt" "${mod}: ${BUILDMODEMSG} ${statstring}"
     elif [[ ${fixedpatch} -gt 0 ]]; then
-      module_status ${i} +1 "diff-checkstyle-${fn}.txt" "${mod}: patch ${statstring}"
+      module_status ${i} +1 "diff-checkstyle-${fn}.txt" "${mod}: ${BUILDMODEMSG} ${statstring}"
       summarize=false
     fi
     ((i=i+1))

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/cmake.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/cmake.sh b/precommit/test-patch.d/cmake.sh
index 9b5f265..7e68a4d 100755
--- a/precommit/test-patch.d/cmake.sh
+++ b/precommit/test-patch.d/cmake.sh
@@ -128,9 +128,9 @@ function cmake_precompile
 
   if [[ "${repostatus}" = branch ]]; then
     # shellcheck disable=SC2153
-    big_console_header "${PATCH_BRANCH} cmake CMakeLists.txt"
+    big_console_header "cmake CMakeLists.txt: ${PATCH_BRANCH}"
   else
-    big_console_header "Patch cmake CMakeLists.txt"
+    big_console_header "cmake CMakeLists.txt: ${BUILDMODE}"
   fi
 
   personality_modules "${repostatus}" CMakeLists.txt

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/findbugs.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/findbugs.sh b/precommit/test-patch.d/findbugs.sh
index e4399fc..152d85f 100755
--- a/precommit/test-patch.d/findbugs.sh
+++ b/precommit/test-patch.d/findbugs.sh
@@ -95,10 +95,8 @@ function findbugs_precheck
 ## @audience     private
 ## @stability    evolving
 ## @replaceable  no
-## @param        repostatus
 function findbugs_maven_skipper
 {
-  declare repostat=$1
   declare -i i=0
   declare skiplist=()
   declare modname
@@ -122,7 +120,11 @@ function findbugs_maven_skipper
   done
 
   if [[ -n "${modname}" ]]; then
-    add_vote_table 0 findbugs "Skipped ${repostat} modules with no Java source: ${skiplist[*]}"
+    if [[ "${BUILDMODE}" = patch ]]; then
+      add_vote_table 0 findbugs "Skipped patched modules with no Java source: ${skiplist[*]}"
+    else
+      add_vote_table 0 findbugs "Skipped ${#skiplist[@]} modules in the source tree with no Java source."
+    fi
   fi
 }
 
@@ -132,6 +134,7 @@ function findbugs_maven_skipper
 ## @replaceable  no
 ## @return       0 on success
 ## @return       1 on failure
+## @param        repostatus
 function findbugs_runner
 {
   local name=$1
@@ -147,7 +150,7 @@ function findbugs_runner
   # strip out any modules that aren't actually java modules
   # this can save a lot of time during testing
   if [[ "${BUILDTOOL}" = maven ]]; then
-    findbugs_maven_skipper "${name}"
+    findbugs_maven_skipper
   fi
 
   "${BUILDTOOL}_modules_worker" "${name}" findbugs
@@ -248,7 +251,7 @@ function findbugs_preapply
     return 0
   fi
 
-  big_console_header "Pre-patch findbugs detection"
+  big_console_header "findbugs detection: ${PATCH_BRANCH}"
 
   findbugs_runner branch
   result=$?
@@ -329,7 +332,7 @@ function findbugs_postinstall
     return 0
   fi
 
-  big_console_header "Patch findbugs detection"
+  big_console_header "findbugs detection: ${BUILDMODE}"
 
   findbugs_runner patch
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/gradle.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/gradle.sh b/precommit/test-patch.d/gradle.sh
index 1f971fa..e809465 100755
--- a/precommit/test-patch.d/gradle.sh
+++ b/precommit/test-patch.d/gradle.sh
@@ -106,9 +106,9 @@ function gradle_precompile
 
   if [[ "${repostatus}" = branch ]]; then
     # shellcheck disable=SC2153
-    big_console_header "${PATCH_BRANCH} gradle bootstrap"
+    big_console_header "gradle boostrap: ${PATCH_BRANCH}"
   else
-    big_console_header "Patch gradle bootstrap"
+    big_console_header "gradle bootstrap: ${BUILDMODE}"
   fi
 
   personality_modules "${repostatus}" gradleboot

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/maven.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/maven.sh b/precommit/test-patch.d/maven.sh
index 1a2a86b..32f4b37 100755
--- a/precommit/test-patch.d/maven.sh
+++ b/precommit/test-patch.d/maven.sh
@@ -95,6 +95,11 @@ function maven_parse_args
 
 function maven_initialize
 {
+  if ! verify_command "maven" "${MAVEN}"; then
+    return 1
+  fi
+
+  # we need to do this before docker does it as root
 
   maven_add_install mvneclipse
   maven_add_install mvnsite
@@ -139,7 +144,7 @@ function maven_precheck
   fi
 
   if [[ ${MAVEN_CUSTOM_REPOS} = true ]]; then
-    MAVEN_LOCAL_REPO="${MAVEN_CUSTOM_REPOS_DIR}/${PROJECT_NAME}-${PATCH_BRANCH}-${INSTANCE}"
+    MAVEN_LOCAL_REPO="${MAVEN_CUSTOM_REPOS_DIR}/${PROJECT_NAME}-${PATCH_BRANCH}-${BUILDMODE}-${INSTANCE}"
     if [[ -e "${MAVEN_LOCAL_REPO}"
        && ! -d "${MAVEN_LOCAL_REPO}" ]]; then
       yetus_error "ERROR: ${MAVEN_LOCAL_REPO} is not a directory."
@@ -369,7 +374,8 @@ function maven_builtin_personality_modules
   # this always makes sure the local repo has a fresh
   # copy of everything per pom rules.
   if [[ ${repostatus} == branch
-        && ${testtype} == mvninstall ]];then
+        && ${testtype} == mvninstall ]] ||
+     [[ "${BUILDMODE}" = full ]];then
     personality_enqueue_module "${CHANGED_UNION_MODULES}"
     return
   fi
@@ -450,9 +456,9 @@ function mvnsite_postcompile
   fi
 
   if [[ "${repostatus}" = branch ]]; then
-    big_console_header "Pre-patch ${PATCH_BRANCH} maven site verification"
+    big_console_header "maven site verification: ${PATCH_BRANCH}"
   else
-    big_console_header "Patch maven site verification"
+    big_console_header "maven site verification: ${BUILDMODE}"
   fi
 
   personality_modules "${repostatus}" mvnsite
@@ -485,9 +491,9 @@ function mvneclipse_postcompile
   fi
 
   if [[ "${repostatus}" = branch ]]; then
-    big_console_header "Pre-patch ${PATCH_BRANCH} maven eclipse verification"
+    big_console_header "maven eclipse verification: ${PATCH_BRANCH}"
   else
-    big_console_header "Patch maven eclipse verification"
+    big_console_header "maven eclipse verification: ${BUILDMODE}"
   fi
 
   personality_modules "${repostatus}" mvneclipse
@@ -536,10 +542,14 @@ function maven_precompile
    return 0
   fi
 
+  if [[ "${BUILDMODE}" = Full ]]; then
+    return 0
+  fi
+
   if [[ "${repostatus}" = branch ]]; then
-    big_console_header "Pre-patch ${PATCH_BRANCH} maven install"
+    big_console_header "maven install: ${PATCH_BRANCH}"
   else
-    big_console_header "Patch maven install"
+    big_console_header "maven install: ${BUILDMODE}"
   fi
 
   personality_modules "${repostatus}" mvninstall
@@ -675,5 +685,9 @@ function maven_reorder_modules
   yetus_debug "Maven: finish re-ordering modules"
   yetus_debug "Finished list: ${CHANGED_MODULES[*]}"
 
-  add_vote_table 0 mvndep "Maven dependency ordering for ${repostatus}"
+  if [[ "${BUILDMODE}" = patch ]]; then
+    add_vote_table 0 mvndep "Maven dependency ordering for ${repostatus}"
+  else
+    add_vote_table 0 mvndep "Maven dependency ordering"
+  fi
 }

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/perlcritic.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/perlcritic.sh b/precommit/test-patch.d/perlcritic.sh
index 8297f46..b376347 100755
--- a/precommit/test-patch.d/perlcritic.sh
+++ b/precommit/test-patch.d/perlcritic.sh
@@ -64,7 +64,7 @@ function perlcritic_preapply
     return 0
   fi
 
-  big_console_header "Perl::Critic plugin: prepatch"
+  big_console_header "Perl::Critic plugin: ${PATCH_BRANCH}"
 
   start_clock
 
@@ -106,7 +106,7 @@ function perlcritic_postapply
     return 0
   fi
 
-  big_console_header "Perl::Critic plugin: postpatch"
+  big_console_header "Perl::Critic plugin: ${BUILDMODE}"
 
   start_clock
 
@@ -147,11 +147,11 @@ function perlcritic_postapply
   statstring=$(generic_calcdiff_status "${numPrepatch}" "${numPostpatch}" "${diffPostpatch}" )
 
   if [[ ${diffPostpatch} -gt 0 ]]; then
-    add_vote_table -1 perlcritic "The applied patch ${statstring}"
+    add_vote_table -1 perlcritic "${BUILDMODEMSG} ${statstring}"
     add_footer_table perlcritic "@@BASE@@/diff-patch-perlcritic.txt"
     return 1
   elif [[ ${fixedpatch} -gt 0 ]]; then
-    add_vote_table +1 perlcritic "The applied patch ${statstring}"
+    add_vote_table +1 perlcritic "${BUILDMODEMSG} ${statstring}"
     return 0
   fi
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/pylint.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/pylint.sh b/precommit/test-patch.d/pylint.sh
index 2a9e1f8..0f1790f 100755
--- a/precommit/test-patch.d/pylint.sh
+++ b/precommit/test-patch.d/pylint.sh
@@ -71,7 +71,7 @@ function pylint_preapply
     return 0
   fi
 
-  big_console_header "pylint plugin: prepatch"
+  big_console_header "pylint plugin: ${PATCH_BRANCH}"
 
   start_clock
 
@@ -87,7 +87,7 @@ function pylint_preapply
   if [[ -f ${PATCH_DIR}/${pylintStderr} ]]; then
     count=$(${GREP} -vc "^No config file found" "${PATCH_DIR}/${pylintStderr}")
     if [[ ${count} -gt 0 ]]; then
-      add_footer_table pylint "prepatch stderr: @@BASE@@/${pylintStderr}"
+      add_footer_table pylint "${PATCH_BRANCH} stderr: @@BASE@@/${pylintStderr}"
       return 1
     fi
   fi
@@ -113,7 +113,7 @@ function pylint_postapply
     return 0
   fi
 
-  big_console_header "pylint plugin: postpatch"
+  big_console_header "pylint plugin: ${BUILDMODE}"
 
   start_clock
 
@@ -135,7 +135,7 @@ function pylint_postapply
     count=$(${GREP} -vc "^No config file found" "${PATCH_DIR}/${pylintStderr}")
     if [[ ${count} -gt 0 ]]; then
       add_vote_table -1 pylint "Something bad seems to have happened in running pylint. Please check pylint stderr files."
-      add_footer_table pylint "postpatch stderr: @@BASE@@/${pylintStderr}"
+      add_footer_table pylint "${BUILDMODEMSG} stderr: @@BASE@@/${pylintStderr}"
       return 1
     fi
   fi
@@ -158,11 +158,11 @@ function pylint_postapply
   statstring=$(generic_calcdiff_status "${numPrepatch}" "${numPostpatch}" "${diffPostpatch}" )
 
   if [[ ${diffPostpatch} -gt 0 ]] ; then
-    add_vote_table -1 pylint "The applied patch ${statstring}"
+    add_vote_table -1 pylint "${BUILDMODEMSG} ${statstring}"
     add_footer_table pylint "@@BASE@@/diff-patch-pylint.txt"
     return 1
   elif [[ ${fixedpatch} -gt 0 ]]; then
-    add_vote_table +1 pylint "The applied patch ${statstring}"
+    add_vote_table +1 pylint "${BUILDMODEMSG} ${statstring}"
     return 0
   fi
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/rubocop.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/rubocop.sh b/precommit/test-patch.d/rubocop.sh
index 8e1d5b8..f73c073 100755
--- a/precommit/test-patch.d/rubocop.sh
+++ b/precommit/test-patch.d/rubocop.sh
@@ -64,7 +64,7 @@ function rubocop_preapply
     return 0
   fi
 
-  big_console_header "rubocop plugin: prepatch"
+  big_console_header "rubocop plugin: ${PATCH_BRANCH}"
 
   start_clock
 
@@ -106,7 +106,7 @@ function rubocop_postapply
     return 0
   fi
 
-  big_console_header "rubocop plugin: postpatch"
+  big_console_header "rubocop plugin: ${BUILDMODE}"
 
   start_clock
 
@@ -146,11 +146,11 @@ function rubocop_postapply
   statstring=$(generic_calcdiff_status "${numPrepatch}" "${numPostpatch}" "${diffPostpatch}" )
 
   if [[ ${diffPostpatch} -gt 0 ]] ; then
-    add_vote_table -1 rubocop "The applied patch ${statstring}"
+    add_vote_table -1 rubocop "${BUILDMODEMSG} ${statstring}"
     add_footer_table rubocop "@@BASE@@/diff-patch-rubocop.txt"
     return 1
   elif [[ ${fixedpatch} -gt 0 ]]; then
-    add_vote_table +1 rubocop "The applied patch ${statstring}"
+    add_vote_table +1 rubocop "${BUILDMODEMSG} ${statstring}"
     return 0
   fi
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/ruby-lint.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/ruby-lint.sh b/precommit/test-patch.d/ruby-lint.sh
index 94d4f53..c57887b 100755
--- a/precommit/test-patch.d/ruby-lint.sh
+++ b/precommit/test-patch.d/ruby-lint.sh
@@ -63,7 +63,7 @@ function ruby_lint_preapply
     return 0
   fi
 
-  big_console_header "ruby-lint plugin: prepatch"
+  big_console_header "ruby-lint plugin: ${PATCH_BRANCH}"
 
   start_clock
 
@@ -136,7 +136,7 @@ function ruby_lint_postapply
     return 0
   fi
 
-  big_console_header "ruby-lint plugin: postpatch"
+  big_console_header "ruby-lint plugin: ${BUILDMODE}"
 
   start_clock
 
@@ -176,11 +176,11 @@ function ruby_lint_postapply
   statstring=$(generic_calcdiff_status "${numPrepatch}" "${numPostpatch}" "${diffPostpatch}" )
 
   if [[ ${diffPostpatch} -gt 0 ]] ; then
-    add_vote_table -1 ruby-lint "The applied patch ${statstring}"
+    add_vote_table -1 ruby-lint "${BUILDMODEMSG} ${statstring}"
     add_footer_table ruby-lint "@@BASE@@/diff-patch-ruby-lint.txt"
     return 1
   elif [[ ${fixedpatch} -gt 0 ]]; then
-    add_vote_table +1 ruby-lint "The applied patch ${statstring}"
+    add_vote_table +1 ruby-lint "${BUILDMODEMSG} ${statstring}"
     return 0
   fi
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/shellcheck.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/shellcheck.sh b/precommit/test-patch.d/shellcheck.sh
index fd5109f..ea18310 100755
--- a/precommit/test-patch.d/shellcheck.sh
+++ b/precommit/test-patch.d/shellcheck.sh
@@ -78,7 +78,7 @@ function shellcheck_preapply
     return 0
   fi
 
-  big_console_header "shellcheck plugin: prepatch"
+  big_console_header "shellcheck plugin: ${PATCH_BRANCH}"
 
   start_clock
 
@@ -129,7 +129,7 @@ function shellcheck_postapply
     return 0
   fi
 
-  big_console_header "shellcheck plugin: postpatch"
+  big_console_header "shellcheck plugin: ${BUILDMODE}"
 
   start_clock
 
@@ -166,12 +166,12 @@ function shellcheck_postapply
   statstring=$(generic_calcdiff_status "${numPrepatch}" "${numPostpatch}" "${diffPostpatch}" )
 
   if [[ ${diffPostpatch} -gt 0 ]] ; then
-    add_vote_table -1 shellcheck "The applied patch ${statstring}"
+    add_vote_table -1 shellcheck "${BUILDMODEMSG} ${statstring}"
     add_footer_table shellcheck "@@BASE@@/diff-patch-shellcheck.txt"
     bugsystem_linecomments "shellcheck" "${PATCH_DIR}/diff-patch-shellcheck.txt"
     return 1
   elif [[ ${fixedpatch} -gt 0 ]]; then
-    add_vote_table +1 shellcheck "The applied patch ${statstring}"
+    add_vote_table +1 shellcheck "${BUILDMODEMSG} ${statstring}"
     return 0
   fi
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/shelldocs.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/shelldocs.sh b/precommit/test-patch.d/shelldocs.sh
index fea982a..d52fa6b 100755
--- a/precommit/test-patch.d/shelldocs.sh
+++ b/precommit/test-patch.d/shelldocs.sh
@@ -103,7 +103,7 @@ function shelldocs_preapply
     return 0
   fi
 
-  big_console_header "shelldocs plugin: prepatch"
+  big_console_header "shelldocs plugin: ${PATCH_BRANCH}"
 
   start_clock
 
@@ -134,7 +134,7 @@ function shelldocs_postapply
     return 0
   fi
 
-  big_console_header "shelldocs plugin: postpatch"
+  big_console_header "shelldocs plugin: ${BUILDMODE}"
 
   start_clock
 
@@ -170,12 +170,12 @@ function shelldocs_postapply
   statstring=$(generic_calcdiff_status "${numPrepatch}" "${numPostpatch}" "${diffPostpatch}" )
 
   if [[ ${diffPostpatch} -gt 0 ]] ; then
-    add_vote_table -1 shelldocs "The applied patch ${statstring}"
+    add_vote_table -1 shelldocs "${BUILDMODEMSG} ${statstring}"
     add_footer_table shelldocs "@@BASE@@/diff-patch-shelldocs.txt"
     bugsystem_linecomments "shelldocs" "${PATCH_DIR}/diff-patch-shelldocs.txt"
     return 1
   elif [[ ${fixedpatch} -gt 0 ]]; then
-    add_vote_table +1 shelldocs "The applied patch ${statstring}"
+    add_vote_table +1 shelldocs "${BUILDMODEMSG} ${statstring}"
     return 0
   fi
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/test4tests.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/test4tests.sh b/precommit/test-patch.d/test4tests.sh
index 644fbf9..6c3230c 100755
--- a/precommit/test-patch.d/test4tests.sh
+++ b/precommit/test-patch.d/test4tests.sh
@@ -27,6 +27,10 @@ function test4tests_patchfile
   declare testReferences=0
   declare i
 
+  if [[ "${BUILDMODE}" = full ]]; then
+    return
+  fi
+
   big_console_header "Checking there are new or changed tests in the patch."
 
   if ! verify_needed_test unit; then

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/whitespace.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/whitespace.sh b/precommit/test-patch.d/whitespace.sh
index a613d81..da0789b 100755
--- a/precommit/test-patch.d/whitespace.sh
+++ b/precommit/test-patch.d/whitespace.sh
@@ -49,21 +49,37 @@ function whitespace_postcompile
   start_clock
 
   pushd "${BASEDIR}" >/dev/null
-  # shellcheck disable=SC2016
-  ${AWK} '/\t/ {print $0}' \
-      "${GITDIFFCONTENT}" \
-    | ${GREP} -v Makefile: >> "${PATCH_DIR}/whitespace-tabs.txt"
 
-   ${GREP} -E '[[:blank:]]$' \
-     "${GITDIFFCONTENT}" \
-      >> "${PATCH_DIR}/whitespace-eol.txt"
+  case "${BUILDMODE}" in
+    patch)
+      # shellcheck disable=SC2016
+      ${AWK} '/\t/ {print $0}' \
+          "${GITDIFFCONTENT}" \
+        | ${GREP} -v Makefile: >> "${PATCH_DIR}/whitespace-tabs.txt"
+
+       ${GREP} -E '[[:blank:]]$' \
+         "${GITDIFFCONTENT}" \
+          >> "${PATCH_DIR}/whitespace-eol.txt"
+    ;;
+    full)
+      ${GIT} grep -n -I --extended-regexp '[[:blank:]]$' \
+         >> "${PATCH_DIR}/whitespace-eol.txt"
+      ${GIT} grep -n -I $'\t' \
+        | "${GREP}" -v Makefile \
+        >> "${PATCH_DIR}/whitespace-tabs.txt"
+    ;;
+  esac
 
   # shellcheck disable=SC2016
   count=$(wc -l "${PATCH_DIR}/whitespace-eol.txt" | ${AWK} '{print $1}')
 
   if [[ ${count} -gt 0 ]]; then
-    add_vote_table -1 whitespace "The patch has ${count}"\
-      " line(s) that end in whitespace. Use git apply --whitespace=fix."
+    if [[ "${BUILDMODE}" = full ]]; then
+      add_vote_table -1 whitespace "${BUILDMODEMSG} has ${count} line(s) that end in whitespace."
+    else
+      add_vote_table -1 whitespace \
+        "${BUILDMODEMSG} has ${count} line(s) that end in whitespace. Use git apply --whitespace=fix."
+    fi
 
     whitespace_linecomment_reporter "${PATCH_DIR}/whitespace-eol.txt" "end of line"
     add_footer_table whitespace "@@BASE@@/whitespace-eol.txt"
@@ -74,7 +90,7 @@ function whitespace_postcompile
   count=$(wc -l "${PATCH_DIR}/whitespace-tabs.txt" | ${AWK} '{print $1}')
 
   if [[ ${count} -gt 0 ]]; then
-    add_vote_table -1 whitespace "The patch has ${count}"\
+    add_vote_table -1 whitespace "${BUILDMODEMSG} ${count}"\
       " line(s) with tabs."
     add_footer_table whitespace "@@BASE@@/whitespace-tabs.txt"
     whitespace_linecomment_reporter "${PATCH_DIR}/whitespace-tabs.txt" "tabs in line"
@@ -87,6 +103,6 @@ function whitespace_postcompile
   fi
 
   popd >/dev/null
-  add_vote_table +1 whitespace "Patch has no whitespace issues."
+  add_vote_table +1 whitespace "${BUILDMODEMSG} has no whitespace issues."
   return 0
 }

http://git-wip-us.apache.org/repos/asf/yetus/blob/78154e1e/precommit/test-patch.d/xml.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/xml.sh b/precommit/test-patch.d/xml.sh
index 08e0a61..6460522 100755
--- a/precommit/test-patch.d/xml.sh
+++ b/precommit/test-patch.d/xml.sh
@@ -48,7 +48,7 @@ function xml_postcompile
     return 0
   fi
 
-  big_console_header "Checking if XML files are well-formed"
+  big_console_header "XML verification: ${BUILDMODE}"
 
   js="${JAVA_HOME}/bin/jrunscript"
 
@@ -65,13 +65,13 @@ function xml_postcompile
   done
 
   if [[ ${count} -gt 0 ]]; then
-    add_vote_table -1 xml "The patch has ${count} ill-formed XML file(s)."
+    add_vote_table -1 xml "${BUILDMODEMSG} has ${count} ill-formed XML file(s)."
     add_footer_table xml "@@BASE@@/xml.txt"
     popd >/dev/null
     return 1
   fi
 
   popd >/dev/null
-  add_vote_table +1 xml "The patch has no ill-formed XML file."
+  add_vote_table +1 xml "${BUILDMODEMSG} has no ill-formed XML file."
   return 0
 }


[02/11] yetus git commit: YETUS-336. javadoc plugin giving conflicting answers on pass/fail

Posted by aw...@apache.org.
YETUS-336. javadoc plugin giving conflicting answers on pass/fail

Signed-off-by: Sean Busbey <bu...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/56cc463e
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/56cc463e
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/56cc463e

Branch: refs/heads/YETUS-156
Commit: 56cc463e9708718e4e5b9526268bedc832b29649
Parents: e58875d
Author: Allen Wittenauer <aw...@apache.org>
Authored: Mon Mar 28 12:56:54 2016 -0700
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Apr 1 22:33:43 2016 -0500

----------------------------------------------------------------------
 precommit/test-patch.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/56cc463e/precommit/test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index 53ef2f2..ee96505 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -2502,14 +2502,14 @@ function generic_postlog_compare
 
     if [[ ${addpatch} -gt 0 ]]; then
       ((result = result + 1))
-      add_vote_table -1 "${testtype}" "${fn}${statusjdk} ${statstring}"
-      add_footer_table "${testtype}" "${fn}: @@BASE@@/diff-${origlog}-${testtype}-${fn}.txt"
+      module_status "${i}" -1 "diff-${origlog}-${testtype}-${fn}.txt" "${fn}${statusjdk} ${statstring}"
     elif [[ ${fixedpatch} -gt 0 ]]; then
-      add_vote_table +1 "${testtype}" "${fn}${statusjdk} ${statstring}"
+      module_status "${i}" +1 "${MODULE_STATUS_LOG[${i}]}" "${fn}${statusjdk} ${statstring}"
       summarize=false
     fi
     ((i=i+1))
   done
+
   modules_messages patch "${testtype}" "${summarize}"
   if [[ ${result} -gt 0 ]]; then
     return 1


[04/11] yetus git commit: YETUS-358 specify bsdtar for source artifact build.

Posted by aw...@apache.org.
YETUS-358 specify bsdtar for source artifact build.

Signed-off-by: Marco Zuehlke <mz...@gmail.com>
Signed-off-by: Kengo Seki <se...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/d35fa808
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/d35fa808
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/d35fa808

Branch: refs/heads/YETUS-156
Commit: d35fa80862b454cccb2a5c969794cc394e2dbcea
Parents: 26aef26
Author: Sean Busbey <bu...@apache.org>
Authored: Thu Mar 31 20:47:00 2016 -0500
Committer: Kengo Seki <se...@apache.org>
Committed: Sun Apr 3 23:56:42 2016 +0900

----------------------------------------------------------------------
 build.sh | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/d35fa808/build.sh
----------------------------------------------------------------------
diff --git a/build.sh b/build.sh
index 6b23683..ebf2872 100755
--- a/build.sh
+++ b/build.sh
@@ -29,10 +29,12 @@
 ## @audience     private
 ## @stability    evolving
 ## @replaceable  no
+## @param        true iff this is a release build
 ## @return       1 - Some dependencies are missing
 ## @return       0 - All dependencies exist
 function detect_dependencies
 {
+  declare is_release=$1
   local exit_code=0
   if ! [ -x "$(command -v java)" ]; then
     echo "Java not found! Must install JDK version >= 1.7" >&2
@@ -49,6 +51,16 @@ function detect_dependencies
     exit_code=1
   fi
 
+  if ! [ -x "$(command -v tar)" ]; then
+    echo "Building archives requires the 'tar' command." >&2
+    exit_code=1
+  fi
+
+  if [ "${is_release}" = "true" ] && ! [ -x "$(command -v bsdtar)" ]; then
+    echo "building the release source archive requires the 'bsdtar' command." >&2
+    exit_code=1
+  fi
+
   if [[ "${exit_code}" -ne "0" ]]; then
     echo "Some dependencies are missing. Exit now." >&2
   fi
@@ -70,7 +82,7 @@ done
 
 echo "working on version '${YETUS_VERSION}'"
 
-detect_dependencies
+detect_dependencies "${release}"
 mkdir -p target
 
 if [ "${offline}" != "true" ]; then
@@ -106,8 +118,8 @@ if [ "${release}" = "true" ]; then
   echo "creating source tarball at '$(pwd)/target/'"
   rm "target/yetus-${YETUS_VERSION}-src".tar* 2>/dev/null || true
   current=$(basename "$(pwd)")
-  tar -s "/${current}/yetus-${YETUS_VERSION}/" -C ../ -cf "target/yetus-${YETUS_VERSION}-src.tar" --exclude '*/target/*' --exclude '*/publish/*' --exclude '*/.git/*' "${current}"
-  tar -s "/target/yetus-${YETUS_VERSION}/" -rf "target/yetus-${YETUS_VERSION}-src.tar" target/RELEASENOTES.md target/CHANGES.md
+  bsdtar -s "/${current}/yetus-${YETUS_VERSION}/" -C ../ -cf "target/yetus-${YETUS_VERSION}-src.tar" --exclude '*/target/*' --exclude '*/publish/*' --exclude '*/.git/*' "${current}"
+  bsdtar -s "/target/yetus-${YETUS_VERSION}/" -rf "target/yetus-${YETUS_VERSION}-src.tar" target/RELEASENOTES.md target/CHANGES.md
   gzip "target/yetus-${YETUS_VERSION}-src.tar"
 fi
 


[11/11] yetus git commit: YETUS-352. hadoop and hbase personality changes for build driver

Posted by aw...@apache.org.
YETUS-352. hadoop and hbase personality changes for build driver

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/593aad2a
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/593aad2a
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/593aad2a

Branch: refs/heads/YETUS-156
Commit: 593aad2ac1b219ff435a9eab31a70be9fd76c917
Parents: 87c70ab
Author: Allen Wittenauer <aw...@apache.org>
Authored: Tue Mar 29 17:33:14 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Sat Apr 9 09:23:50 2016 -0700

----------------------------------------------------------------------
 precommit/personality/hadoop.sh | 4 ++--
 precommit/personality/hbase.sh  | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/593aad2a/precommit/personality/hadoop.sh
----------------------------------------------------------------------
diff --git a/precommit/personality/hadoop.sh b/precommit/personality/hadoop.sh
index 02df4b1..580a9c8 100755
--- a/precommit/personality/hadoop.sh
+++ b/precommit/personality/hadoop.sh
@@ -185,7 +185,7 @@ function personality_modules
         ordering=.
       fi
 
-      if [[ ${repostatus} = patch ]]; then
+      if [[ "${repostatus}" = patch && "${BUILDMODE}" = patch ]]; then
         echo "javadoc pre-reqs:"
         for i in hadoop-project \
           hadoop-common-project/hadoop-annotations; do
@@ -206,7 +206,7 @@ function personality_modules
     ;;
     mvninstall)
       extra="-DskipTests"
-      if [[ ${repostatus} = branch ]]; then
+      if [[ "${repostatus}" = branch || "${BUILDMODE}" = full ]]; then
         ordering=.
       fi
     ;;

http://git-wip-us.apache.org/repos/asf/yetus/blob/593aad2a/precommit/personality/hbase.sh
----------------------------------------------------------------------
diff --git a/precommit/personality/hbase.sh b/precommit/personality/hbase.sh
index 7863bb2..a270b46 100755
--- a/precommit/personality/hbase.sh
+++ b/precommit/personality/hbase.sh
@@ -45,7 +45,8 @@ function personality_modules
   extra="-DHBasePatchProcess"
 
   if [[ ${repostatus} == branch
-     && ${testtype} == mvninstall ]];then
+     && ${testtype} == mvninstall ]] ||
+     [[ "${BUILDMODE}" == full ]]; then
      personality_enqueue_module . ${extra}
      return
    fi


[07/11] yetus git commit: YETUS-348. add ability to write console report to a file

Posted by aw...@apache.org.
YETUS-348. add ability to write console report to a file

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/e2d17dc8
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/e2d17dc8
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/e2d17dc8

Branch: refs/heads/YETUS-156
Commit: e2d17dc89b877549ce2b190f0f536db337b1fe88
Parents: 16d964f
Author: Allen Wittenauer <aw...@apache.org>
Authored: Tue Mar 29 15:23:33 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Sat Apr 9 09:23:50 2016 -0700

----------------------------------------------------------------------
 precommit/core.d/00-yetuslib.sh                 |  2 +-
 precommit/core.d/builtin-bugsystem.sh           | 10 ++++++++++
 precommit/core.d/docker.sh                      |  5 +++++
 .../test-patch-docker/launch-test-patch.sh      |  4 ++++
 precommit/test-patch.sh                         | 20 +++++++++++++++++---
 5 files changed, 37 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/e2d17dc8/precommit/core.d/00-yetuslib.sh
----------------------------------------------------------------------
diff --git a/precommit/core.d/00-yetuslib.sh b/precommit/core.d/00-yetuslib.sh
index 1bd63b7..4105641 100755
--- a/precommit/core.d/00-yetuslib.sh
+++ b/precommit/core.d/00-yetuslib.sh
@@ -101,7 +101,7 @@ function yetus_run_and_redirect
 ## @description  Given a filename or dir, return the absolute version of it
 ## @audience     public
 ## @stability    stable
-## @param        directory
+## @param        fsobj
 ## @replaceable  no
 ## @return       0 success
 ## @return       1 failure

http://git-wip-us.apache.org/repos/asf/yetus/blob/e2d17dc8/precommit/core.d/builtin-bugsystem.sh
----------------------------------------------------------------------
diff --git a/precommit/core.d/builtin-bugsystem.sh b/precommit/core.d/builtin-bugsystem.sh
index f83e7c9..c7d9a6c 100755
--- a/precommit/core.d/builtin-bugsystem.sh
+++ b/precommit/core.d/builtin-bugsystem.sh
@@ -45,6 +45,11 @@ function console_finalreport
   declare seccoladj=0
   declare spcfx=${PATCH_DIR}/spcl.txt
 
+  if [[ -n "${CONSOLE_REPORT_FILE}" ]]; then
+    exec 6>&1
+    exec >"${CONSOLE_REPORT_FILE}"
+  fi
+
   if [[ ${result} == 0 ]]; then
     if [[ ${ROBOT} == false ]]; then
       if declare -f ${PROJECT_NAME}_console_success >/dev/null; then
@@ -154,4 +159,9 @@ function console_finalreport
     printf "%s\n" "${comment}"
     ((i=i+1))
   done
+
+  if [[ -n "${CONSOLE_REPORT_FILE}" ]]; then
+    exec 1>&6 6>&-
+    cat "${CONSOLE_REPORT_FILE}"
+  fi
 }

http://git-wip-us.apache.org/repos/asf/yetus/blob/e2d17dc8/precommit/core.d/docker.sh
----------------------------------------------------------------------
diff --git a/precommit/core.d/docker.sh b/precommit/core.d/docker.sh
index 2d7f550..062c8c1 100755
--- a/precommit/core.d/docker.sh
+++ b/precommit/core.d/docker.sh
@@ -570,6 +570,11 @@ PatchSpecificDocker
     DOCKER_EXTRAARGS=("--privileged" "${DOCKER_EXTRAARGS[@]}")
   fi
 
+  if [[ -n "${CONSOLE_REPORT_FILE}" ]]; then
+    touch "${CONSOLE_REPORT_FILE}"
+    DOCKER_EXTRAARGS=("${DOCKER_EXTRAARGS[@]}" "-v" "${CONSOLE_REPORT_FILE}:/testptch/console.txt")
+  fi
+
   client=$(docker_version Client)
   server=$(docker_version Server)
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/e2d17dc8/precommit/test-patch-docker/launch-test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch-docker/launch-test-patch.sh b/precommit/test-patch-docker/launch-test-patch.sh
index a7b040c..d54c502 100755
--- a/precommit/test-patch-docker/launch-test-patch.sh
+++ b/precommit/test-patch-docker/launch-test-patch.sh
@@ -57,6 +57,10 @@ if [[ "${PATCH_SYSTEM}" = generic ]]; then
   OVERWRITEARGS=("${OVERWRITEARGS[@]}" "/testptch/extras/patch")
 fi
 
+if [[ -f /testptch/console.txt ]]; then
+  OVERWRITEARGS=("${OVERWRITEARGS[@]}" "--console-report-file=/testptch/console.txt")
+fi
+
 cd "${PATCH_DIR}/precommit/"
 #shellcheck disable=SC2086
 "${PATCH_DIR}/precommit/test-patch.sh" \

http://git-wip-us.apache.org/repos/asf/yetus/blob/e2d17dc8/precommit/test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index ee96505..e0dbc29 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -646,7 +646,6 @@ function relative_dir
 ## @replaceable  no
 function yetus_usage
 {
-
   declare bugsys
   declare jdktlist
 
@@ -720,6 +719,7 @@ function yetus_usage
   yetus_add_option "--build-url=<url>" "Set the build location web page (Default: '${BUILD_URL}')"
   yetus_add_option "--build-url-console=<location>" "Location relative to --build-url of the console (Default: '${BUILD_URL_CONSOLE}')"
   yetus_add_option "--build-url-patchdir=<location>" "Location relative to --build-url of the --patch-dir (Default: '${BUILD_URL_ARTIFACTS}')"
+  yetus_add_option "--console-report-file=<file>" "Save the final console-based report to a file in addition to the screen"
   yetus_add_option "--console-urls" "Use the build URL instead of path on the console report"
   yetus_add_option "--instance=<string>" "Parallel execution identifier string"
   yetus_add_option "--jenkins" "Enable Jenkins-specifc handling (auto: --robot)"
@@ -784,6 +784,9 @@ function parse_args
         # shellcheck disable=SC2034
         BUILD_URL_CONSOLE=${i#*=}
       ;;
+      --console-report-file=*)
+        CONSOLE_REPORT_FILE=${i#*=}
+      ;;
       --console-urls)
         # shellcheck disable=SC2034
         CONSOLE_USE_BUILD_URL=true
@@ -935,6 +938,7 @@ function parse_args
     PATCH_DIR="${USER_PATCH_DIR}"
   fi
 
+  # we need absolute dir for PATCH_DIR
   cd "${STARTINGDIR}"
   if [[ ! -d ${PATCH_DIR} ]]; then
     mkdir -p "${PATCH_DIR}"
@@ -945,10 +949,20 @@ function parse_args
       cleanup_and_exit 1
     fi
   fi
-
-  # we need absolute dir for PATCH_DIR
   PATCH_DIR=$(yetus_abs "${PATCH_DIR}")
 
+  # we need absolute dir for ${CONSOLE_REPORT_FILE}
+  if [[ -n "${CONSOLE_REPORT_FILE}" ]]; then
+    touch "${CONSOLE_REPORT_FILE}"
+    if [[ $? != 0 ]]; then
+      yetus_error "ERROR: cannot write to ${CONSOLE_REPORT_FILE}. Disabling console report file."
+      unset CONSOLE_REPORT_FILE
+    else
+      j="${CONSOLE_REPORT_FILE}"
+      CONSOLE_REPORT_FILE=$(yetus_abs "${j}")
+    fi
+  fi
+
   if [[ ${RESETREPO} == "true" ]] ; then
     yetus_add_entry EXEC_MODES ResetRepo
   fi


[06/11] yetus git commit: YETUS-347. change docker handler to use arrays

Posted by aw...@apache.org.
YETUS-347. change docker handler to use arrays

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/16d964fd
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/16d964fd
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/16d964fd

Branch: refs/heads/YETUS-156
Commit: 16d964fd25d289505fdcc1b970847af5ff36051b
Parents: d35fa80
Author: Allen Wittenauer <aw...@apache.org>
Authored: Tue Mar 29 13:17:19 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Sat Apr 9 09:23:50 2016 -0700

----------------------------------------------------------------------
 .../in-progress/precommit-buildtools.md         |  2 +-
 precommit/core.d/docker.sh                      | 21 ++++++++---------
 .../test-patch-docker/launch-test-patch.sh      | 24 ++++++++++++--------
 precommit/test-patch.d/ant.sh                   |  2 +-
 precommit/test-patch.d/gradle.sh                |  2 +-
 precommit/test-patch.d/maven.sh                 |  5 ++--
 6 files changed, 28 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/16d964fd/asf-site-src/source/documentation/in-progress/precommit-buildtools.md
----------------------------------------------------------------------
diff --git a/asf-site-src/source/documentation/in-progress/precommit-buildtools.md b/asf-site-src/source/documentation/in-progress/precommit-buildtools.md
index e800135..bf530ba 100644
--- a/asf-site-src/source/documentation/in-progress/precommit-buildtools.md
+++ b/asf-site-src/source/documentation/in-progress/precommit-buildtools.md
@@ -102,7 +102,7 @@ For example, the gradle build tool does not have a standard way to execute check
 
 * pluginname\_docker\_support
 
-    - If this build tool requires extra settings on the `docker run` command line, this function should be defined and write those options into a file called `${PATCH_DIR}/buildtool-docker-params.txt`.  This is particularly useful for things like mounting volumes for repository caches.
+    - If this build tool requires extra settings on the `docker run` command line, this function should be defined and add those options into an array called `${DOCKER_EXTRAARGS[@]}`. This is particularly useful for things like mounting volumes for repository caches.
 
        **WARNING**: Be aware that directories that do not exist MAY be created by root by Docker itself under certain conditions.  It is HIGHLY recommend that `pluginname_initialize` be used to create the necessary directories prior to be used in the `docker run` command.
 

http://git-wip-us.apache.org/repos/asf/yetus/blob/16d964fd/precommit/core.d/docker.sh
----------------------------------------------------------------------
diff --git a/precommit/core.d/docker.sh b/precommit/core.d/docker.sh
index e0706a3..2d7f550 100755
--- a/precommit/core.d/docker.sh
+++ b/precommit/core.d/docker.sh
@@ -23,6 +23,8 @@ DOCKERFAIL="fallback,continue,fail"
 DOCKERSUPPORT=false
 DOCKER_ENABLE_PRIVILEGED=true
 
+declare -a DOCKER_EXTRAARGS
+
 ####
 #### IMPORTANT
 ####
@@ -531,7 +533,7 @@ function docker_run_image
     cleanup_and_exit 1
   fi
 
-  big_console_header "Building patch image: ${patchimagename}"
+  big_console_header "Building ${BUILDMODE} image: ${patchimagename}"
   start_clock
   # using the base image, make one that is patch specific
   dockercmd build \
@@ -564,14 +566,8 @@ PatchSpecificDocker
     cleanup_and_exit 1
   fi
 
-  if [[ -f "${PATCH_DIR}/buildtool-docker-params.txt" ]]; then
-    extraargs=$(cat "${PATCH_DIR}/buildtool-docker-params.txt")
-  else
-    extraargs=""
-  fi
-
   if [[ "${DOCKER_ENABLE_PRIVILEGED}" = true ]]; then
-    extraargs="${extraargs} --privileged "
+    DOCKER_EXTRAARGS=("--privileged" "${DOCKER_EXTRAARGS[@]}")
   fi
 
   client=$(docker_version Client)
@@ -579,9 +575,8 @@ PatchSpecificDocker
 
   dockerversion="Client=${client} Server=${server}"
   if [[ ${PATCH_DIR} =~ ^/ ]]; then
-    # shellcheck disable=SC2086
     exec "${DOCKERCMD}" run --rm=true -i \
-      ${extraargs} \
+      "${DOCKER_EXTRAARGS[@]}" \
       -v "${PWD}:/testptch/${PROJECT_NAME}" \
       -v "${PATCH_DIR}:/testptch/patchprocess" \
       -u "${USER_NAME}" \
@@ -596,9 +591,8 @@ PatchSpecificDocker
       --name "${containername}" \
       "${patchimagename}"
   else
-    # shellcheck disable=SC2086
     exec "${DOCKERCMD}" run --rm=true -i \
-      ${extraargs} \
+      "${DOCKER_EXTRAARGS[@]}" \
       -v "${PWD}:/testptch/${PROJECT_NAME}" \
       -u "${USER_NAME}" \
       -w "/testptch/${PROJECT_NAME}" \
@@ -612,6 +606,9 @@ PatchSpecificDocker
       --name "${containername}" \
       "${patchimagename}"
   fi
+
+  # this should never get reached, but we put it here just in case
+  cleanup_and_exit 1
 }
 
 ## @description  Switch over to a Docker container

http://git-wip-us.apache.org/repos/asf/yetus/blob/16d964fd/precommit/test-patch-docker/launch-test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch-docker/launch-test-patch.sh b/precommit/test-patch-docker/launch-test-patch.sh
index aac0d21..a7b040c 100755
--- a/precommit/test-patch-docker/launch-test-patch.sh
+++ b/precommit/test-patch-docker/launch-test-patch.sh
@@ -14,6 +14,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+declare -a OVERWRITEARGS=("--reexec")
+
+OVERWRITEARGS=("${OVERWRITEARGS[@]}" "--dockermode")
+OVERWRITEARGS=("${OVERWRITEARGS[@]}" "--basedir=${BASEDIR}")
+
 cd "${BASEDIR}"
 
 if [[ -n ${JAVA_HOME}
@@ -25,6 +30,10 @@ fi
 if [[ -z ${JAVA_HOME} ]]; then
   JAVA_HOME=$(find /usr/lib/jvm/ -name "java-*" -type d | tail -1)
   export JAVA_HOME
+  if [[ -n "${JAVA_HOME}" ]]; then
+    OVERWRITEARGS=("${OVERWRITEARGS[@]}" "--java-home=${JAVA_HOME}")
+    echo "Setting ${JAVA_HOME} as the JAVA_HOME."
+  fi
 fi
 
 # Avoid out of memory errors in builds
@@ -35,9 +44,9 @@ export MAVEN_OPTS
 TESTPATCHMODE=${TESTPATCHMODE/--docker }
 TESTPATCHMODE=${TESTPATCHMODE%--docker}
 
-
-cd "${BASEDIR}"
 PATCH_DIR=$(cd -P -- "${PATCH_DIR}" >/dev/null && pwd -P)
+OVERWRITEARGS=("${OVERWRITEARGS[@]}" "--patch-dir=${PATCH_DIR}")
+OVERWRITEARGS=("${OVERWRITEARGS[@]}" "--user-plugins=${PATCH_DIR}/precommit/user-plugins")
 
 # if patch system is generic, then it's either a local
 # patch file or was in some other way not pulled from a bug
@@ -45,16 +54,11 @@ PATCH_DIR=$(cd -P -- "${PATCH_DIR}" >/dev/null && pwd -P)
 # test-patch where to find it.
 if [[ "${PATCH_SYSTEM}" = generic ]]; then
   cp -p "${PATCH_DIR}/patch" /testptch/extras/patch
-  patchfile="/testptch/extras/patch"
+  OVERWRITEARGS=("${OVERWRITEARGS[@]}" "/testptch/extras/patch")
 fi
 
 cd "${PATCH_DIR}/precommit/"
 #shellcheck disable=SC2086
 "${PATCH_DIR}/precommit/test-patch.sh" \
-   --reexec \
-   --dockermode ${TESTPATCHMODE} \
-   --basedir="${BASEDIR}" \
-   --patch-dir="${PATCH_DIR}" \
-   --java-home="${JAVA_HOME}" \
-   --user-plugins="${PATCH_DIR}/precommit/user-plugins" \
-   ${patchfile}
+   ${TESTPATCHMODE} \
+  "${OVERWRITEARGS[@]}"

http://git-wip-us.apache.org/repos/asf/yetus/blob/16d964fd/precommit/test-patch.d/ant.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/ant.sh b/precommit/test-patch.d/ant.sh
index 64c4067..61e13c9 100755
--- a/precommit/test-patch.d/ant.sh
+++ b/precommit/test-patch.d/ant.sh
@@ -200,5 +200,5 @@ function ant_builtin_personality_file_tests
 
 function ant_docker_support
 {
-  echo "-v ${HOME}/.ivy2:${HOME}/.ivy2" > "${PATCH_DIR}/buildtool-docker-params.txt"
+  DOCKER_EXTRAARGS=("${DOCKER_EXTRAARGS}" "-v" "${HOME}/.ivy2:${HOME}/.ivy2")
 }

http://git-wip-us.apache.org/repos/asf/yetus/blob/16d964fd/precommit/test-patch.d/gradle.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/gradle.sh b/precommit/test-patch.d/gradle.sh
index 57e023d..1f971fa 100755
--- a/precommit/test-patch.d/gradle.sh
+++ b/precommit/test-patch.d/gradle.sh
@@ -277,5 +277,5 @@ function gradle_builtin_personality_file_tests
 
 function gradle_docker_support
 {
-  echo "-v ${HOME}/.gradle:${HOME}/.gradle" > "${PATCH_DIR}/buildtool-docker-params.txt"
+  DOCKER_EXTRAARGS=("${DOCKER_EXTRAARGS[@]}" "-v" "${HOME}/.gradle:${HOME}/.gradle")
 }

http://git-wip-us.apache.org/repos/asf/yetus/blob/16d964fd/precommit/test-patch.d/maven.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/maven.sh b/precommit/test-patch.d/maven.sh
index 2e006c1..1a2a86b 100755
--- a/precommit/test-patch.d/maven.sh
+++ b/precommit/test-patch.d/maven.sh
@@ -554,11 +554,10 @@ function maven_precompile
 
 function maven_docker_support
 {
-  echo "-v ${HOME}/.m2:${HOME}/.m2" > "${PATCH_DIR}/buildtool-docker-params.txt"
+  DOCKER_EXTRAARGS=("${DOCKER_EXTRAARGS[@]}" "-v" "${HOME}/.m2:${HOME}/.m2")
 
   if [[ ${MAVEN_CUSTOM_REPOS} = true ]]; then
-    echo "-v ${MAVEN_CUSTOM_REPOS_DIR}:${MAVEN_CUSTOM_REPOS_DIR}" \
-      >> "${PATCH_DIR}/buildtool-docker-params.txt"
+    DOCKER_EXTRAARGS=("${DOCKER_EXTRAARGS[@]}" "-v" "${MAVEN_CUSTOM_REPOS_DIR}:${MAVEN_CUSTOM_REPOS_DIR}")
   fi
 }