YETUS-500. Add section headers to break out precheck/branch compilation checks from patch checks.
Signed-off-by: Sean Busbey <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/cf22763c Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/cf22763c Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/cf22763c Branch: refs/heads/master Commit: cf22763ce1fc529260b5c6d732bdc894f233712a Parents: 7d305f0 Author: Allen Wittenauer <[email protected]> Authored: Fri May 19 16:23:23 2017 -0700 Committer: Sean Busbey <[email protected]> Committed: Fri Jul 7 01:53:21 2017 -0400 ---------------------------------------------------------------------- precommit/core.d/builtin-bugsystem.sh | 8 ++++++-- precommit/test-patch.d/briefreport.sh | 8 ++++++++ precommit/test-patch.d/bugzilla.sh | 3 +++ precommit/test-patch.d/github.sh | 13 ++++++++++++- precommit/test-patch.d/htmlout.sh | 17 +++++++++++++++-- precommit/test-patch.d/jira.sh | 13 +++++++++++++ precommit/test-patch.sh | 27 ++++++++++++++++++++++++++- 7 files changed, 83 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/cf22763c/precommit/core.d/builtin-bugsystem.sh ---------------------------------------------------------------------- diff --git a/precommit/core.d/builtin-bugsystem.sh b/precommit/core.d/builtin-bugsystem.sh index cc14572..23c5d02 100755 --- a/precommit/core.d/builtin-bugsystem.sh +++ b/precommit/core.d/builtin-bugsystem.sh @@ -122,8 +122,12 @@ function console_finalreport normaltop=$(head -1 "${commentfile1}") ${SED} -e '1d' "${commentfile1}" > "${commentfile2}" - printf "| %4s | %*s | %-10s |%-s\n" "${vote}" ${seccoladj} \ - "${subs}" "${calctime}" "${normaltop}" + if [[ "${vote}" = "H" ]]; then + printf "| | %*s | |%-s\n" ${seccoladj} " " "${normaltop}" + else + printf "| %4s | %*s | %-10s |%-s\n" "${vote}" ${seccoladj} \ + "${subs}" "${calctime}" "${normaltop}" + fi while read -r line; do printf "| | %*s | | %-s\n" ${seccoladj} " " "${line}" done < "${commentfile2}" http://git-wip-us.apache.org/repos/asf/yetus/blob/cf22763c/precommit/test-patch.d/briefreport.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/briefreport.sh b/precommit/test-patch.d/briefreport.sh index 144e234..9285641 100755 --- a/precommit/test-patch.d/briefreport.sh +++ b/precommit/test-patch.d/briefreport.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# there are no public APIs here +# SHELLDOC-IGNORE + add_bugsystem brieftext BRIEFOUT_LONGRUNNING=3600 @@ -114,6 +117,11 @@ function brieftext_finalreport subs=$(echo "${ourstring}" | cut -f3 -d\|) ela=$(echo "${ourstring}" | cut -f4 -d\|) + if [[ "${vote}" = "H" ]]; then + ((i=i+1)) + continue + fi + if [[ ${vote// } = -1 ]]; then failed=("${failed[@]}" "${subs}") fi http://git-wip-us.apache.org/repos/asf/yetus/blob/cf22763c/precommit/test-patch.d/bugzilla.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/bugzilla.sh b/precommit/test-patch.d/bugzilla.sh index 9d04a04..9b7caeb 100755 --- a/precommit/test-patch.d/bugzilla.sh +++ b/precommit/test-patch.d/bugzilla.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# no public APIs here +# SHELLDOC-IGNORE + add_bugsystem bugzilla # personalities can override the following settings: http://git-wip-us.apache.org/repos/asf/yetus/blob/cf22763c/precommit/test-patch.d/github.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/github.sh b/precommit/test-patch.d/github.sh index f249770..3b01b26 100755 --- a/precommit/test-patch.d/github.sh +++ b/precommit/test-patch.d/github.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# no public APIs here +# SHELLDOC-IGNORE + # This bug system provides github integration add_bugsystem github @@ -456,7 +459,15 @@ function github_finalreport i=0 until [[ ${i} -eq ${#TP_VOTE_TABLE[@]} ]]; do - echo "${TP_VOTE_TABLE[${i}]}" >> "${commentfile}" + ourstring=$(echo "${TP_VOTE_TABLE[${i}]}" | tr -s ' ') + vote=$(echo "${ourstring}" | cut -f2 -d\| | tr -d ' ') + comment=$(echo "${ourstring}" | cut -f5 -d\|) + + if [[ "${vote}" = "H" ]]; then + echo "||| _${comment}_ |" >> "${commentfile}" + else + echo "${TP_VOTE_TABLE[${i}]}" >> "${commentfile}" + fi ((i=i+1)) done http://git-wip-us.apache.org/repos/asf/yetus/blob/cf22763c/precommit/test-patch.d/htmlout.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/htmlout.sh b/precommit/test-patch.d/htmlout.sh index f2dab40..1279134 100755 --- a/precommit/test-patch.d/htmlout.sh +++ b/precommit/test-patch.d/htmlout.sh @@ -130,6 +130,19 @@ function htmlout_finalreport calctime=$(clock_display "${ela}") comment=$(echo "${ourstring}" | cut -f5 -d\|) + if [[ "${vote}" = "H" ]]; then + { + echo "<tr>" + printf "\t\t<td></td>" + printf "<td></td>" + printf "<td></td>" + printf "<td><font color=\"%s\">%s</font></td>\n" "brown" "${comment}" + echo "</tr>" + } >> "${commentfile}" + ((i=i+1)) + continue + fi + # summary line if [[ -z ${vote} && -n ${ela} ]]; then @@ -160,10 +173,10 @@ function htmlout_finalreport { echo "<tr>" - printf "<td><font color=\"%s\">%s</font></td>" "${color}" "${vote}" + printf "\t\t<td><font color=\"%s\">%s</font></td>" "${color}" "${vote}" printf "<td><font color=\"%s\">%s</font></td>" "${color}" "${subs}" printf "<td><font color=\"%s\">%s</font></td>" "${color}" "${calctime}" - printf "<td><font color=\"%s\">%s</font></td>" "${color}" "${comment}" + printf "<td><font color=\"%s\">%s</font></td>\n" "${color}" "${comment}" echo "</tr>" } >> "${commentfile}" ((i=i+1)) http://git-wip-us.apache.org/repos/asf/yetus/blob/cf22763c/precommit/test-patch.d/jira.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.d/jira.sh b/precommit/test-patch.d/jira.sh index 89f5162..cce82a0 100755 --- a/precommit/test-patch.d/jira.sh +++ b/precommit/test-patch.d/jira.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +# no public APIs here +# SHELLDOC-IGNORE + # this bug system handles JIRA. Personalities # can override the following variables: @@ -404,6 +407,12 @@ function jira_finalreport calctime=$(clock_display "${ela}") comment=$(echo "${ourstring}" | cut -f5 -d\|) + if [[ "${vote}" = "H" ]]; then + echo "|| || || || {color:brown}${comment}{color} ||" >> "${commentfile}" + ((i=i+1)) + continue + fi + # summary line if [[ -z ${vote} && -n ${ela} ]]; then @@ -426,6 +435,10 @@ function jira_finalreport -0) color="orange" ;; + H) + # this never gets called (see above) but this is here so others know the color is taken + color="brown" + ;; *) color="black" ;; http://git-wip-us.apache.org/repos/asf/yetus/blob/cf22763c/precommit/test-patch.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh index 75dbbe4..aef362a 100755 --- a/precommit/test-patch.sh +++ b/precommit/test-patch.sh @@ -224,10 +224,13 @@ function add_header_line ## @description subsystem (or test) that is providing the vote. The second parameter ## @description is always required. The third parameter is any extra verbage that goes ## @description with that subsystem. +## @description if the vote is H, then that designates that "subsystem" should be a +## @description header in the vote table comment output. The other parameters are +## @description ignored ## @audience public ## @stability stable ## @replaceable no -## @param +1/0/-1 +## @param +1/0/-1/H ## @param subsystem ## @param string function add_vote_table @@ -243,6 +246,12 @@ function add_vote_table yetus_debug "add_vote_table ${value} ${subsystem} ${elapsed} ${*}" + if [[ "${value}" = H ]]; then + TP_VOTE_TABLE[${TP_VOTE_COUNTER}]="|${value}| | | ${subsystem} |" + ((TP_VOTE_COUNTER=TP_VOTE_COUNTER+1)) + return + fi + if [[ ${value} == "1" ]]; then value="+1" fi @@ -3109,11 +3118,16 @@ else initialize "$@" fi +add_vote_table H "Prechecks" + prechecks if [[ "${BUILDMODE}" = patch ]]; then + patchfiletests + add_vote_table H "${PATCH_BRANCH} Compile Tests" + compile_cycle branch distclean @@ -3121,10 +3135,20 @@ if [[ "${BUILDMODE}" = patch ]]; then apply_patch_file compute_gitdiff + + add_vote_table H "Patch Compile Tests" + +else + + add_vote_table H "Compile Tests" + fi + compile_cycle patch +add_vote_table H "Other Tests" + runtests finish_vote_table @@ -3133,3 +3157,4 @@ finish_footer_table bugsystem_finalreport ${RESULT} cleanup_and_exit ${RESULT} +
