yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [yetus] branch master updated: YETUS-797. patches that remove modules trigger offset_clock assert
Date Tue, 19 Feb 2019 08:02:45 GMT
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yetus.git


The following commit(s) were added to refs/heads/master by this push:
     new 03e367c  YETUS-797. patches that remove modules trigger offset_clock assert
03e367c is described below

commit 03e367cc1773b90a3633ad90c116168639f39aaf
Author: Allen Wittenauer <aw@apache.org>
AuthorDate: Fri Feb 15 22:38:52 2019 -0800

    YETUS-797. patches that remove modules trigger offset_clock assert
    
    Signed-off-by: Allen Wittenauer <aw@apache.org>
---
 precommit/src/main/shell/core.d/change-analysis.sh |  8 ++++++++
 precommit/src/main/shell/test-patch.sh             | 21 +++++++++++++--------
 2 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/precommit/src/main/shell/core.d/change-analysis.sh b/precommit/src/main/shell/core.d/change-analysis.sh
index 4b1fb13..916dd29 100755
--- a/precommit/src/main/shell/core.d/change-analysis.sh
+++ b/precommit/src/main/shell/core.d/change-analysis.sh
@@ -182,6 +182,14 @@ function find_changed_modules
 
   CHANGED_MODULES+=("${USER_MODULE_LIST[@]}")
 
+  for i in "${CHANGED_MODULES[@]}"; do
+    if [[ -d "${i}" ]]; then
+      tmpmods+=("${i}")
+    fi
+  done
+
+  CHANGED_MODULES=("${tmpmods[@]}")
+
   yetus_sort_and_unique_array CHANGED_MODULES
 
   yetus_debug "Locate the union of ${CHANGED_MODULES[*]}"
diff --git a/precommit/src/main/shell/test-patch.sh b/precommit/src/main/shell/test-patch.sh
index 1847edc..dc1b9fb 100755
--- a/precommit/src/main/shell/test-patch.sh
+++ b/precommit/src/main/shell/test-patch.sh
@@ -182,13 +182,13 @@ function offset_clock
 ## @return       exits
 function generate_stack
 {
-  declare frame
+  declare -i frame
 
-  if [[ "${YETUS_SHELL_SCRIPT_DEBUG}" = true ]]; then
-    while caller "${frame}"; do
-      ((frame++));
-    done
-  fi
+  frame=0
+
+  while caller "${frame}"; do
+    ((frame++));
+  done
   exit 1
 }
 
@@ -1447,7 +1447,7 @@ function buildtool_cwd
   if [[ "${BUILDTOOLCWD}" =~ ^/ ]]; then
     yetus_debug "buildtool_cwd: ${BUILDTOOLCWD}"
     if [[ ! -e "${BUILDTOOLCWD}" ]]; then
-      mkdir -p "${BUILDTOOLCWD}"
+      mkdir -p "${BUILDTOOLCWD}" || return 1
     fi
     pushd "${BUILDTOOLCWD}" >/dev/null || return 1
     return 0
@@ -1458,10 +1458,13 @@ function buildtool_cwd
       pushd "${BASEDIR}" >/dev/null || return 1
     ;;
     module)
+      if [[ ! -d "${BASEDIR}/${MODULE[${modindex}]}" ]]; then
+        return 1
+      fi
       pushd "${BASEDIR}/${MODULE[${modindex}]}" >/dev/null || return 1
     ;;
     *)
-      pushd "$(pwd)" || return 1
+      pushd "$(pwd)" >/dev/null || return 1
     ;;
   esac
 }
@@ -1832,6 +1835,8 @@ function modules_workers
     if ! buildtool_cwd "${modindex}"; then
       echo "${BASEDIR}/${MODULE[${modindex}]} no longer exists. Skipping."
       ((modindex=modindex+1))
+      savestop=$(stop_clock)
+      MODULE_STATUS_TIMER[${modindex}]=${savestop}
       continue
     fi
 


Mime
View raw message