Repository: yetus Updated Branches: refs/heads/master 310a372e2 -> 691755d8b
YETUS-26. rebrand for yetus Signed-off-by: Allen Wittenauer <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/691755d8 Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/691755d8 Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/691755d8 Branch: refs/heads/master Commit: 691755d8b306e8c4f0474b5511a5ac4a61cd2a4f Parents: 310a372 Author: Allen Wittenauer <[email protected]> Authored: Fri Oct 9 11:42:13 2015 -0700 Committer: Allen Wittenauer <[email protected]> Committed: Sun Oct 11 09:41:52 2015 -0700 ---------------------------------------------------------------------- .../documentation/latest/precommit-basic.md | 7 ++-- .../latest/precommit-patchnames.md | 37 +++++++++++++++++++ dev-support/personality/hadoop.sh | 10 ++++++ dev-support/test-patch.d/builtin-bugsystem.sh | 38 ++++++++++++-------- dev-support/test-patch.sh | 14 ++++---- 5 files changed, 81 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/691755d8/asf-site-src/source/documentation/latest/precommit-basic.md ---------------------------------------------------------------------- diff --git a/asf-site-src/source/documentation/latest/precommit-basic.md b/asf-site-src/source/documentation/latest/precommit-basic.md index 1f1ee9b..478fdc0 100644 --- a/asf-site-src/source/documentation/latest/precommit-basic.md +++ b/asf-site-src/source/documentation/latest/precommit-basic.md @@ -26,11 +26,12 @@ test-patch # Purpose -As part of Hadoop's commit process, all patches to the source base go through a precommit test that does some (relatively) light checking to make sure the proposed change does not break unit tests and/or passes some other prerequisites such as code formatting guidelines. This is meant as a preliminary check for committers so that the basic patch is in a known state and for contributors to know if they have followed the project's guidelines. This check, called test-patch, may also be used by individual developers to verify a patch prior to sending to the Hadoop QA systems. +As part of Apache Hadoop's commit process, all patches to the source base go through a precommit test that does some (relatively) light checking to make sure the proposed change does not break unit tests and/or passes some other prerequisites such as code formatting guidelines. This is meant as a preliminary check for committers so that the basic patch is in a known state and for contributors to know if they have followed the project's guidelines. This check, called test-patch, along with a helper program, called smart-apply-patch, may also be used by individual developers to verify a patch prior to sending to the Apache Hadoop QA systems. -Other projects have adopted a similar methodology after seeing great success in the Hadoop model. Some have even gone as far as forking Hadoop's precommit code and modifying it to meet their project's needs. +Other projects have adopted a similar methodology after seeing great success in the Apache Hadoop model. Some have even gone as far as forking Apache Hadoop's precommit code and modifying it to meet their project's needs. -This is a modification to Hadoop's version of test-patch so that we may bring together all of these forks under a common code base to help the community as a whole. +One of the key facets of Apache Yetus is to bring together all of these forks under a common code base to help software development +as a whole. # Pre-requisites http://git-wip-us.apache.org/repos/asf/yetus/blob/691755d8/asf-site-src/source/documentation/latest/precommit-patchnames.md ---------------------------------------------------------------------- diff --git a/asf-site-src/source/documentation/latest/precommit-patchnames.md b/asf-site-src/source/documentation/latest/precommit-patchnames.md new file mode 100644 index 0000000..f976b0b --- /dev/null +++ b/asf-site-src/source/documentation/latest/precommit-patchnames.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. +--> + +We use Apache Yetus to process your patch. It supports the following patterns and +procedures for patch file names: + +JIRA: + +If JIRA support is configured, attach the patch to the given ISSUE and +click 'Submit Patch'. The patch file should be named one of: + + * ISSUE.patch + * ISSUE.###.patch + * ISSUE.branch.###.patch + * ISSUE-branch-###.patch + * ISSUE.##.branch.patch + * ISSUE-branch.##.patch + +If Github support is also configured, a comment that contains a link to a Pull Request's +patch file (e.g., https://github.com/user/repo/pull/1.patch) will pull the patch from +the given Github PR. http://git-wip-us.apache.org/repos/asf/yetus/blob/691755d8/dev-support/personality/hadoop.sh ---------------------------------------------------------------------- diff --git a/dev-support/personality/hadoop.sh b/dev-support/personality/hadoop.sh index 0dd89db..51cfd91 100755 --- a/dev-support/personality/hadoop.sh +++ b/dev-support/personality/hadoop.sh @@ -361,3 +361,13 @@ function personality_file_tests add_test findbugs fi } + +function hadoop_console_success +{ + printf "IF9fX19fX19fX18gCjwgU3VjY2VzcyEgPgogLS0tLS0tLS0tLSAKIFwgICAg"; + printf "IC9cICBfX18gIC9cCiAgXCAgIC8vIFwvICAgXC8gXFwKICAgICAoKCAgICBP"; + printf "IE8gICAgKSkKICAgICAgXFwgLyAgICAgXCAvLwogICAgICAgXC8gIHwgfCAg"; + printf "XC8gCiAgICAgICAgfCAgfCB8ICB8ICAKICAgICAgICB8ICB8IHwgIHwgIAog"; + printf "ICAgICAgIHwgICBvICAgfCAgCiAgICAgICAgfCB8ICAgfCB8ICAKICAgICAg"; + printf "ICB8bXwgICB8bXwgIAo" +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/yetus/blob/691755d8/dev-support/test-patch.d/builtin-bugsystem.sh ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.d/builtin-bugsystem.sh b/dev-support/test-patch.d/builtin-bugsystem.sh index de0f01b..6773ba0 100755 --- a/dev-support/test-patch.d/builtin-bugsystem.sh +++ b/dev-support/test-patch.d/builtin-bugsystem.sh @@ -67,25 +67,33 @@ function console_finalreport if [[ ${result} == 0 ]]; then if [[ ${JENKINS} == false ]]; then - { - printf "IF9fX19fX19fX18gCjwgU3VjY2VzcyEgPgogLS0tLS0tLS0tLSAKIFwgICAg"; - printf "IC9cICBfX18gIC9cCiAgXCAgIC8vIFwvICAgXC8gXFwKICAgICAoKCAgICBP"; - printf "IE8gICAgKSkKICAgICAgXFwgLyAgICAgXCAvLwogICAgICAgXC8gIHwgfCAg"; - printf "XC8gCiAgICAgICAgfCAgfCB8ICB8ICAKICAgICAgICB8ICB8IHwgIHwgIAog"; - printf "ICAgICAgIHwgICBvICAgfCAgCiAgICAgICAgfCB8ICAgfCB8ICAKICAgICAg"; - printf "ICB8bXwgICB8bXwgIAo" - } > "${spcfx}" + if declare -f ${PROJECT_NAME}_console_success >/dev/null; then + ${PROJECT_NAME}_console_success > "${spcfx}" + else + { + printf "IF9fX18gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfIAovIF9fX3wg"; + printf "XyAgIF8gIF9fXyBfX18gX19fICBfX18gX19ffCB8ClxfX18gXHwgfCB8IHwv"; + printf "IF9fLyBfXy8gXyBcLyBfXy8gX198IHwKIF9fXykgfCB8X3wgfCAoX3wgKF98"; + printf "ICBfXy9cX18gXF9fIFxffAp8X19fXy8gXF9fLF98XF9fX1xfX19cX19ffHxf"; + printf "X18vX19fKF8pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg"; + printf "ICAK"; + } > "${spcfx}" + fi fi printf "\n\n+1 overall\n\n" else if [[ ${JENKINS} == false ]]; then - { - printf "IF9fX19fICAgICBfIF8gICAgICAgICAgICAgICAgXyAKfCAgX19ffF8gXyhf"; - printf "KSB8XyAgIF8gXyBfXyBfX198IHwKfCB8XyAvIF9gIHwgfCB8IHwgfCB8ICdf"; - printf "Xy8gXyBcIHwKfCAgX3wgKF98IHwgfCB8IHxffCB8IHwgfCAgX18vX3wKfF98"; - printf "ICBcX18sX3xffF98XF9fLF98X3wgIFxfX18oXykKICAgICAgICAgICAgICAg"; - printf "ICAgICAgICAgICAgICAgICAK" - } > "${spcfx}" + if declare -f ${PROJECT_NAME}_console_failure >/dev/null; then + ${PROJECT_NAME}_console_failure > "${spcfx}" + else + { + printf "IF9fX19fICAgICBfIF8gICAgICAgICAgICAgICAgXyAKfCAgX19ffF8gXyhf"; + printf "KSB8XyAgIF8gXyBfXyBfX198IHwKfCB8XyAvIF9gIHwgfCB8IHwgfCB8ICdf"; + printf "Xy8gXyBcIHwKfCAgX3wgKF98IHwgfCB8IHxffCB8IHwgfCAgX18vX3wKfF98"; + printf "ICBcX18sX3xffF98XF9fLF98X3wgIFxfX18oXykKICAgICAgICAgICAgICAg"; + printf "ICAgICAgICAgICAgICAgICAK" + } > "${spcfx}" + fi fi printf "\n\n-1 overall\n\n" fi http://git-wip-us.apache.org/repos/asf/yetus/blob/691755d8/dev-support/test-patch.sh ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index ccd1bbe..0e72999 100755 --- a/dev-support/test-patch.sh +++ b/dev-support/test-patch.sh @@ -59,7 +59,7 @@ function setup_defaults common_defaults DOCKERFILE="${BINDIR}/test-patch-docker/Dockerfile-startstub" - HOW_TO_CONTRIBUTE="https://wiki.apache.org/hadoop/HowToContribute" + HOW_TO_CONTRIBUTE="https://yetus.apache.org/documentation/latest/precommit-patchnames" INSTANCE=${RANDOM} RELOCATE_PATCH_DIR=false @@ -660,12 +660,10 @@ function yetus_usage { local -r up=$(echo "${PROJECT_NAME}" | tr '[:lower:]' '[:upper:]') - echo "Usage: test-patch.sh [options] patch-file | issue-number | http" + echo "Usage: test-patch.sh [options] patch" echo echo "Where:" - echo " patch-file is a local patch file containing the changes to test" - echo " issue-number is a 'Patch Available' JIRA defect number (e.g. '${up}-9902') to test" - echo " http is an HTTP address to download the patch file" + echo " patch is a file, URL, or bugsystem-compatible location of the patch file" echo echo "Options:" echo "--basedir=<dir> The directory to apply the patch to (default current directory)" @@ -2062,6 +2060,8 @@ function bugsystem_finalreport { declare bugs + add_footer_table "Powered by" "Apache Yetus http://yetus.apache.org" + for bugs in ${BUGCOMMENTS}; do if declare -f ${bugs}_finalreport >/dev/null;then "${bugs}_finalreport" "${@}" @@ -2176,8 +2176,8 @@ function generic_count_probs declare testtype=$1 declare input=$2 - if declare -f ${PROJECT}_${testtype}_count_probs >/dev/null; then - "${PROJECT}_${testtype}_count_probs" "${input}" + if declare -f ${PROJECT_NAME}_${testtype}_count_probs >/dev/null; then + "${PROJECT_NAME}_${testtype}_count_probs" "${input}" elif declare -f ${BUILDTOOL}_${testtype}_count_probs >/dev/null; then "${BUILDTOOL}_${testtype}_count_probs" "${input}" else
