Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7B93B200D0E for ; Tue, 26 Sep 2017 17:07:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 76A011609C1; Tue, 26 Sep 2017 15:07:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BC2191609B4 for ; Tue, 26 Sep 2017 17:07:14 +0200 (CEST) Received: (qmail 94966 invoked by uid 500); 26 Sep 2017 15:07:13 -0000 Mailing-List: contact commits-help@yetus.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@yetus.apache.org Delivered-To: mailing list commits@yetus.apache.org Received: (qmail 94957 invoked by uid 99); 26 Sep 2017 15:07:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Sep 2017 15:07:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B2B74F5602; Tue, 26 Sep 2017 15:07:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: busbey@apache.org To: commits@yetus.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: yetus git commit: YETUS-543 Add shaded client related ITs to Hadoop exemplar personality (addendum) Date: Tue, 26 Sep 2017 15:07:13 +0000 (UTC) archived-at: Tue, 26 Sep 2017 15:07:15 -0000 Repository: yetus Updated Branches: refs/heads/master 8343bd0fe -> 04aefaa34 YETUS-543 Add shaded client related ITs to Hadoop exemplar personality (addendum) Signed-off-by: Andrew Wang Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/04aefaa3 Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/04aefaa3 Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/04aefaa3 Branch: refs/heads/master Commit: 04aefaa342d99ae13c0d50a786dbdae35dd69b69 Parents: 8343bd0 Author: Sean Busbey Authored: Tue Sep 19 09:28:17 2017 -0500 Committer: Sean Busbey Committed: Tue Sep 26 10:06:12 2017 -0500 ---------------------------------------------------------------------- precommit/personality/hadoop.sh | 67 ++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 34 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/04aefaa3/precommit/personality/hadoop.sh ---------------------------------------------------------------------- diff --git a/precommit/personality/hadoop.sh b/precommit/personality/hadoop.sh index ea52e40..c5c972c 100755 --- a/precommit/personality/hadoop.sh +++ b/precommit/personality/hadoop.sh @@ -38,7 +38,6 @@ function personality_globals GITHUB_REPO="apache/hadoop" #shellcheck disable=SC2034 PYLINT_OPTIONS="--indent-string=' '" - CLIENT_TESTS=() HADOOP_HOMEBREW_DIR=${HADOOP_HOMEBREW_DIR:-$(brew --prefix 2>/dev/null)} if [[ -z "${HADOOP_HOMEBREW_DIR}" ]]; then @@ -392,6 +391,7 @@ function personality_file_tests if [[ ${filename} =~ src/main/webapp ]]; then yetus_debug "tests/webapp: ${filename}" + add_test shadedclient elif [[ ${filename} =~ \.sh || ${filename} =~ \.cmd || ${filename} =~ src/scripts @@ -435,6 +435,13 @@ function personality_file_tests add_test mvninstall add_test mvnsite add_test unit + add_test shadedclient + fi + + # if we change anything in here, e.g. the test scripts + # then run the client artifact tests + if [[ ${filename} =~ hadoop-client-modules ]]; then + add_test shadedclient fi if [[ ${filename} =~ src/test ]]; then @@ -470,10 +477,29 @@ add_test_type shadedclient ## @stability evolving function shadedclient_initialize { - declare -a modules=() + maven_add_install shadedclient +} + +## @description build client facing shaded artifacts and test them +## @audience private +## @stability evolving +## @param repostatus +function shadedclient_rebuild +{ + declare repostatus=$1 + declare logfile="${PATCH_DIR}/${repostatus}-shadedclient.txt" declare module + declare -a modules=() + + if [[ ${OSTYPE} = Windows_NT || + ${OSTYPE} =~ ^CYGWIN.* || + ${OSTYPE} =~ ^MINGW32.* || + ${OSTYPE} =~ ^MSYS.* ]]; then + yetus_info "hadoop personality: building on windows, skipping check of client artifacts." + return 0 + fi - yetus_debug "hadoop personality: initializing client artifacts checks." + yetus_debug "hadoop personality: seeing if we need the test of client artifacts." for module in hadoop-client-modules/hadoop-client-check-invariants \ hadoop-client-modules/hadoop-client-check-test-invariants \ hadoop-client-modules/hadoop-client-integration-tests; do @@ -482,43 +508,16 @@ function shadedclient_initialize modules=( ${modules[@]} -pl ${module} ) fi done - if [ ${#modules[@]} -gt 0 ]; then - CLIENT_TESTS=( "${modules[@]}" ) - maven_add_install shadedclient - add_test shadedclient - fi -} - -## @description remove files created by the rebuild function -## @audience private -## @stability evolving -function shadedclient_clean -{ - if [ ${#CLIENT_TESTS[@]} -gt 0 ]; then - yetus_debug "hadoop personality: cleaning up test modules." - "${MAVEN}" "${MAVEN_ARGS[@]}" clean -fae -am "${CLIENT_TESTS[@]}" - fi -} - -## @description build client facing shaded artifacts and test them -## @audience private -## @stability evolving -## @param repostatus -function shadedclient_rebuild -{ - local repostatus=$1 - local logfile="${PATCH_DIR}/${repostatus}-shadedclient.txt" - - if [ ${#CLIENT_TESTS[@]} -eq 0 ]; then - yetus_debug "hadoop personality: no test modules present, skipping." + if [ ${#modules[@]} -eq 0 ]; then + yetus_info "hadoop personality: no test modules present, skipping check of client artifacts." return 0 fi big_console_header "Checking client artifacts on ${repostatus}" echo_and_redirect "${logfile}" \ - "${MAVEN}" "${MAVEN_ARGS[@]}" clean verify -fae --batch-mode -am \ - "${CLIENT_TESTS[@]}" \ + "${MAVEN}" "${MAVEN_ARGS[@]}" verify -fae --batch-mode -am \ + "${modules[@]}" \ -Dtest=NoUnitTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true count=$(${GREP} -c '\[ERROR\]' "${logfile}")