You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2016/04/12 20:08:03 UTC
yetus git commit: YETUS-370. multiple compile test types confuse
later runs
Repository: yetus
Updated Branches:
refs/heads/YETUS-156 22bf113b9 -> 902f49318
YETUS-370. multiple compile test types confuse later runs
Signed-off-by: Allen Wittenauer <aw...@apache.org>
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 <aw...@apache.org>
Authored: Tue Apr 12 09:07:08 2016 -0700
Committer: Allen Wittenauer <aw...@apache.org>
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}"