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 6C13F19802 for ; Tue, 12 Apr 2016 18:08:04 +0000 (UTC) Received: (qmail 68681 invoked by uid 500); 12 Apr 2016 18:08:04 -0000 Delivered-To: apmail-yetus-commits-archive@yetus.apache.org Received: (qmail 68660 invoked by uid 500); 12 Apr 2016 18:08:04 -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 68651 invoked by uid 99); 12 Apr 2016 18:08:04 -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, 12 Apr 2016 18:08:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 17C3ADFA6F; Tue, 12 Apr 2016 18:08:03 +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 Message-Id: <8ca2a27bbe694cf990fe1444da60a57e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: yetus git commit: YETUS-370. multiple compile test types confuse later runs Date: Tue, 12 Apr 2016 18:08:03 +0000 (UTC) Repository: yetus Updated Branches: refs/heads/YETUS-156 22bf113b9 -> 902f49318 YETUS-370. multiple compile test types confuse later runs 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/902f4931 Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/902f4931 Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/902f4931 Branch: refs/heads/YETUS-156 Commit: 902f493182da9477c9a9c9a0729e90e5f881303b Parents: 22bf113 Author: Allen Wittenauer Authored: Tue Apr 12 09:07:08 2016 -0700 Committer: Allen Wittenauer Committed: Tue Apr 12 11:04:45 2016 -0700 ---------------------------------------------------------------------- precommit/test-patch.sh | 58 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/902f4931/precommit/test-patch.sh ---------------------------------------------------------------------- diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh index f4752b5..9f866ae 100755 --- a/precommit/test-patch.sh +++ b/precommit/test-patch.sh @@ -40,12 +40,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 @@ -1728,6 +1733,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 @@ -1929,7 +1960,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) @@ -2384,11 +2415,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)) @@ -2501,11 +2532,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 @@ -2697,7 +2728,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}"