yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sek...@apache.org
Subject yetus git commit: YETUS-275. removing files(?) causes pylint file open failures.
Date Mon, 18 Jan 2016 01:25:46 GMT
Repository: yetus
Updated Branches:
  refs/heads/master f26542932 -> 61220e9d0


YETUS-275. removing files(?) causes pylint file open failures.

00:
  * ensure that branchlog and patchlog file exist when calling caldiffs
  * remove equvalient tests from before calling that method
  * for pylint add 3 argument to caldiffs funtion call

Signed-off-by: Kengo Seki <sekikn@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/61220e9d
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/61220e9d
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/61220e9d

Branch: refs/heads/master
Commit: 61220e9d0891b397c4432aa2c5dc531787087157
Parents: f265429
Author: Marco Zuehlke <mzuehlke@gmail.com>
Authored: Sun Jan 17 22:16:34 2016 +0100
Committer: Kengo Seki <sekikn@apache.org>
Committed: Mon Jan 18 10:25:19 2016 +0900

----------------------------------------------------------------------
 precommit/test-patch.d/checkstyle.sh |  4 ----
 precommit/test-patch.d/pylint.sh     |  4 +++-
 precommit/test-patch.d/shellcheck.sh |  4 ----
 precommit/test-patch.sh              | 20 ++++++++++++++------
 4 files changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/61220e9d/precommit/test-patch.d/checkstyle.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/checkstyle.sh b/precommit/test-patch.d/checkstyle.sh
index 4f46630..c645757 100755
--- a/precommit/test-patch.d/checkstyle.sh
+++ b/precommit/test-patch.d/checkstyle.sh
@@ -336,10 +336,6 @@ function checkstyle_postapply
     module=${MODULE[$i]}
     fn=$(module_file_fragment "${module}")
 
-    if [[ ! -f "${PATCH_DIR}/branch-checkstyle-${fn}.txt" ]]; then
-      touch "${PATCH_DIR}/branch-checkstyle-${fn}.txt"
-    fi
-
     # call calcdiffs to allow overrides
     calcdiffs \
       "${PATCH_DIR}/branch-checkstyle-${fn}.txt" \

http://git-wip-us.apache.org/repos/asf/yetus/blob/61220e9d/precommit/test-patch.d/pylint.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/pylint.sh b/precommit/test-patch.d/pylint.sh
index a5b809a..c98b2e0 100755
--- a/precommit/test-patch.d/pylint.sh
+++ b/precommit/test-patch.d/pylint.sh
@@ -148,7 +148,9 @@ function pylint_postapply
   PYLINT_VERSION=$(${PYLINT} --version 2>/dev/null | ${GREP} pylint | ${AWK} '{print $NF}')
   add_footer_table pylint "v${PYLINT_VERSION%,}"
 
-  calcdiffs "${PATCH_DIR}/branch-pylint-result.txt" "${PATCH_DIR}/patch-pylint-result.txt"
> "${PATCH_DIR}/diff-patch-pylint.txt"
+  calcdiffs "${PATCH_DIR}/branch-pylint-result.txt" \
+            "${PATCH_DIR}/patch-pylint-result.txt" \
+            pylint > "${PATCH_DIR}/diff-patch-pylint.txt"
   numPrepatch=$(${GREP} -c "^.*:.*: \[.*\] " "${PATCH_DIR}/branch-pylint-result.txt")
   numPostpatch=$(${GREP} -c "^.*:.*: \[.*\] " "${PATCH_DIR}/patch-pylint-result.txt")
   diffPostpatch=$(${GREP} -c "^.*:.*: \[.*\] " "${PATCH_DIR}/diff-patch-pylint.txt")

http://git-wip-us.apache.org/repos/asf/yetus/blob/61220e9d/precommit/test-patch.d/shellcheck.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/shellcheck.sh b/precommit/test-patch.d/shellcheck.sh
index 5b0b524..5de8726 100755
--- a/precommit/test-patch.d/shellcheck.sh
+++ b/precommit/test-patch.d/shellcheck.sh
@@ -147,10 +147,6 @@ function shellcheck_postapply
     fi
   done
 
-  if [[ ! -f "${PATCH_DIR}/branch-shellcheck-result.txt" ]]; then
-    touch "${PATCH_DIR}/branch-shellcheck-result.txt"
-  fi
-
   calcdiffs \
     "${PATCH_DIR}/branch-shellcheck-result.txt" \
     "${PATCH_DIR}/patch-shellcheck-result.txt" \

http://git-wip-us.apache.org/repos/asf/yetus/blob/61220e9d/precommit/test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index 471efa7..3ed0dc5 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -2232,18 +2232,26 @@ function error_calcdiffs
 ## @return       differences
 function calcdiffs
 {
-  declare branch=$1
-  declare patch=$2
+  declare branchlog=$1
+  declare patchlog=$2
   declare testtype=$3
 
+  # ensure that both log files exist
+  if [[ ! -f "${branchlog}" ]]; then
+    touch "${branchlog}"
+  fi
+  if [[ ! -f "${patchlog}" ]]; then
+    touch "${patchlog}"
+  fi
+
   if declare -f ${PROJECT_NAME}_${testtype}_calcdiffs >/dev/null; then
-    "${PROJECT_NAME}_${testtype}_calcdiffs" "${branch}" "${patch}"
+    "${PROJECT_NAME}_${testtype}_calcdiffs" "${branchlog}" "${patchlog}"
   elif declare -f ${BUILDTOOL}_${testtype}_calcdiffs >/dev/null; then
-    "${BUILDTOOL}_${testtype}_calcdiffs" "${branch}" "${patch}"
+    "${BUILDTOOL}_${testtype}_calcdiffs" "${branchlog}" "${patchlog}"
   elif declare -f ${testtype}_calcdiffs >/dev/null; then
-    "${testtype}_calcdiffs" "${branch}" "${patch}"
+    "${testtype}_calcdiffs" "${branchlog}" "${patchlog}"
   else
-    error_calcdiffs "${branch}" "${patch}"
+    error_calcdiffs "${branchlog}" "${patchlog}"
   fi
 }
 


Mime
View raw message