Return-Path: X-Original-To: apmail-yetus-commits-archive@minotaur.apache.org Delivered-To: apmail-yetus-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A5B419B2C for ; Thu, 14 Apr 2016 07:24:57 +0000 (UTC) Received: (qmail 21894 invoked by uid 500); 14 Apr 2016 07:24:57 -0000 Delivered-To: apmail-yetus-commits-archive@yetus.apache.org Received: (qmail 21821 invoked by uid 500); 14 Apr 2016 07:24:57 -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 21561 invoked by uid 99); 14 Apr 2016 07:24:57 -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; Thu, 14 Apr 2016 07:24:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CC5F9E0556; Thu, 14 Apr 2016 07:24:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aw@apache.org To: commits@yetus.apache.org Date: Thu, 14 Apr 2016 07:24:58 -0000 Message-Id: In-Reply-To: <7eb7171b238d426fb7f8f3262a4578d8@git.apache.org> References: <7eb7171b238d426fb7f8f3262a4578d8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/20] yetus git commit: YETUS-374. need a way to ignore results from a list of tests YETUS-374. need a way to ignore results from a list of tests Signed-off-by: Allen Wittenauer Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/b353d3fb Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/b353d3fb Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/b353d3fb Branch: refs/heads/YETUS-156 Commit: b353d3fbeba445023ba3dba030bac759fabd0c8d Parents: f8da25b Author: Allen Wittenauer Authored: Tue Apr 12 14:35:26 2016 -0700 Committer: Allen Wittenauer Committed: Thu Apr 14 00:24:45 2016 -0700 ---------------------------------------------------------------------- precommit/test-patch.sh | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/b353d3fb/precommit/test-patch.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh index 9fb26dc..5f7dfd9 100755 --- a/precommit/test-patch.sh +++ b/precommit/test-patch.sh @@ -236,12 +236,15 @@ function add_header_line ## @return Elapsed time display function add_vote_table { - local value=$1 - local subsystem=$2 + declare value=$1 + declare subsystem=$2 shift 2 - local calctime - local -r elapsed=$(stop_clock) + declare calctime + # apparently shellcheck doesn't know about declare -r + #shellcheck disable=SC2155 + declare -r elapsed=$(stop_clock) + declare filt yetus_debug "add_vote_table ${value} ${subsystem} ${*}" @@ -251,6 +254,12 @@ function add_vote_table value="+1" fi + for filt in "${VOTE_FILTER[@]}"; do + if [[ "${subsystem}" = "${filt}" ]]; then + value=0 + fi + done + if [[ -z ${value} ]]; then # shellcheck disable=SC2034 TP_VOTE_TABLE[${TP_VOTE_COUNTER}]="| | ${subsystem} | | ${*:-} |" @@ -259,6 +268,10 @@ function add_vote_table TP_VOTE_TABLE[${TP_VOTE_COUNTER}]="| ${value} | ${subsystem} | ${calctime} | $* |" fi ((TP_VOTE_COUNTER=TP_VOTE_COUNTER+1)) + + if [[ "${value}" = -1 ]]; then + ((RESULT = RESULT + 1)) + fi } ## @description Report the JVM version of the given directory @@ -709,6 +722,7 @@ function yetus_usage yetus_add_option "--summarize=" "Allow tests to summarize results" yetus_add_option "--test-parallel=" "Run multiple tests in parallel (default false in developer mode, true in Jenkins mode)" yetus_add_option "--test-threads=" "Number of tests to run in parallel (default defined in ${PROJECT_NAME} build)" + yetus_add_option "--tests-filter=" "Lists of tests to turn failures into warnings" yetus_add_option "--user-plugins=" "A directory of user provided plugins. see test-patch.d for examples (default empty)" yetus_add_option "--version" "Print release version information and exit" @@ -884,6 +898,9 @@ function parse_args # shellcheck disable=SC2034 TEST_THREADS=${i#*=} ;; + --tests-filter=*) + yetus_comma_to_array VOTE_FILTER "${i#*=}" + ;; --tpglobaltimer=*) GLOBALTIMER=${i#*=} ;; @@ -2272,8 +2289,6 @@ function runtests verify_patchdir_still_exists check_unittests - - (( RESULT = RESULT + $? )) fi for plugin in ${TESTTYPES}; do @@ -2283,7 +2298,6 @@ function runtests yetus_debug "Running ${plugin}_tests" #shellcheck disable=SC2086 ${plugin}_tests - (( RESULT = RESULT + $? )) fi done } @@ -3043,10 +3057,8 @@ prechecks if [[ "${BUILDMODE}" = patch ]]; then patchfiletests - ((RESULT=RESULT+$?)) compile_cycle branch - ((RESULT=RESULT+$?)) distclean @@ -3056,10 +3068,8 @@ if [[ "${BUILDMODE}" = patch ]]; then fi compile_cycle patch -((RESULT=RESULT+$?)) runtests -((RESULT=RESULT+$?)) finish_vote_table