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 491F218C7A for ; Sun, 17 Apr 2016 17:14:50 +0000 (UTC) Received: (qmail 54793 invoked by uid 500); 17 Apr 2016 17:14:50 -0000 Delivered-To: apmail-yetus-commits-archive@yetus.apache.org Received: (qmail 54720 invoked by uid 500); 17 Apr 2016 17:14:50 -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 54410 invoked by uid 99); 17 Apr 2016 17:14:49 -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; Sun, 17 Apr 2016 17:14:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6A752DFF81; Sun, 17 Apr 2016 17:14:49 +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: Sun, 17 Apr 2016 17:14:50 -0000 Message-Id: <454bb743d03e456fb24ecb2a99c21695@git.apache.org> In-Reply-To: <454431215a98480b8d4cb2bd8781f5e6@git.apache.org> References: <454431215a98480b8d4cb2bd8781f5e6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/23] yetus git commit: YETUS-370. multiple compile test types confuse later runs YETUS-370. multiple compile test types confuse later runs Signed-off-by: Sean Busbey Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/1652c31d Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/1652c31d Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/1652c31d Branch: refs/heads/YETUS-156 Commit: 1652c31d42ee835e7444c6bce1df4f9689adf512 Parents: 4ea61e2 Author: Allen Wittenauer Authored: Tue Apr 12 09:07:08 2016 -0700 Committer: Allen Wittenauer Committed: Sun Apr 17 10:06:38 2016 -0700 ---------------------------------------------------------------------- precommit/test-patch.sh | 58 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/1652c31d/precommit/test-patch.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh index ee96505..d840f32 100755 --- a/precommit/test-patch.sh +++ b/precommit/test-patch.sh @@ -38,12 +38,17 @@ declare -a TP_HEADER declare -a TP_VOTE_TABLE declare -a TP_TEST_TABLE declare -a TP_FOOTER_TABLE +declare -a MODULE +declare -a MODULE_BACKUP_STATUS +declare -a MODULE_BACKUP_STATUS_TIMER +declare -a MODULE_BACKUP_STATUS_MSG +declare -a MODULE_BACKUP_STATUS_LOG +declare -a MODULE_BACKUP_COMPILE_LOG declare -a MODULE_STATUS declare -a MODULE_STATUS_TIMER declare -a MODULE_STATUS_MSG declare -a MODULE_STATUS_LOG declare -a MODULE_COMPILE_LOG -declare -a MODULE declare -a USER_MODULE_LIST TP_HEADER_COUNTER=0 @@ -1674,6 +1679,32 @@ function modules_reset MODULE_COMPILE_LOG=() } +## @description Backup the MODULE globals prior to loop processing +## @audience public +## @stability evolving +## @replaceable no +function modules_backup +{ + MODULE_BACKUP_STATUS=("${MODULE_STATUS[@]}") + MODULE_BACKUP_STATUS_TIMER=("${MODULE_STATUS_TIMER[@]}") + MODULE_BACKUP_STATUS_MSG=("${MODULE_STATUS_MSG[@]}") + MODULE_BACKUP_STATUS_LOG=("${MODULE_STATUS_LOG[@]}") + MODULE_BACKUP_COMPILE_LOG=("${MODULE_COMPILE_LOG[@]}") +} + +## @description Restore the backup +## @audience public +## @stability evolving +## @replaceable no +function modules_restore +{ + MODULE_STATUS=("${MODULE_BACKUP_STATUS[@]}") + MODULE_STATUS_TIMER=("${MODULE_BACKUP_STATUS_TIMER[@]}") + MODULE_STATUS_MSG=("${MODULE_BACKUP_STATUS_MSG[@]}") + MODULE_STATUS_LOG=("${MODULE_BACKUP_STATUS_LOG[@]}") + MODULE_COMPILE_LOG=("${MODULE_BACKUP_COMPILE_LOG[@]}") +} + ## @description Utility to print standard module errors ## @audience public ## @stability evolving @@ -1873,7 +1904,7 @@ function modules_workers # compile is special if [[ ${testtype} = compile ]]; then MODULE_COMPILE_LOG[${modindex}]="${PATCH_DIR}/${repostatus}-${testtype}-${fn}.txt" - yetus_debug "Comile log set to ${MODULE_COMPILE_LOG[${modindex}]}" + yetus_debug "Compile log set to ${MODULE_COMPILE_LOG[${modindex}]}" fi savestop=$(stop_clock) @@ -2328,11 +2359,11 @@ function calcdiffs ## @return errorstring function generic_calcdiff_status { - declare numbranch=$1 - declare numpatch=$2 - declare addpatch=$3 - declare samepatch - declare fixedpatch + declare -i numbranch=$1 + declare -i numpatch=$2 + declare -i addpatch=$3 + declare -i samepatch + declare -i fixedpatch ((samepatch=numpatch-addpatch)) ((fixedpatch=numbranch-numpatch+addpatch)) @@ -2441,11 +2472,11 @@ function generic_postlog_compare declare fn declare jdk declare statusjdk - declare numbranch - declare numpatch - declare addpatch - declare samepatch - declare fixedpatch + declare -i numbranch=0 + declare -i numpatch=0 + declare -i addpatch=0 + declare -i samepatch=0 + declare -i fixedpatch=0 declare summarize=true if [[ ${multijdk} == true ]]; then @@ -2637,7 +2668,10 @@ function compile_nonjvm "${BUILDTOOL}_modules_worker" "${codebase}" compile modules_messages "${codebase}" compile true + modules_backup + for plugin in ${TESTTYPES}; do + modules_restore verify_patchdir_still_exists if declare -f ${plugin}_compile >/dev/null 2>&1; then yetus_debug "Running ${plugin}_compile ${codebase} ${multijdkmode}"