hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject hadoop git commit: HADOOP-11944. add option to test-patch to avoid relocating patch process directory (Sean Busbey via aw)
Date Mon, 18 May 2015 16:14:32 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 d82222920 -> 10c922b5c


HADOOP-11944. add option to test-patch to avoid relocating patch process directory (Sean Busbey
via aw)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/10c922b5
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/10c922b5
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/10c922b5

Branch: refs/heads/branch-2
Commit: 10c922b5c6b9282061ca8e4ae7f4b68012a3b4a3
Parents: d822229
Author: Allen Wittenauer <aw@apache.org>
Authored: Mon May 18 16:13:50 2015 +0000
Committer: Allen Wittenauer <aw@apache.org>
Committed: Mon May 18 16:14:24 2015 +0000

----------------------------------------------------------------------
 dev-support/test-patch.sh                       | 28 +++++++++++---------
 hadoop-common-project/hadoop-common/CHANGES.txt |  3 +++
 2 files changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/10c922b5/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 00a638c..ae74c5b 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -38,6 +38,7 @@ function setup_defaults
   HOW_TO_CONTRIBUTE="https://wiki.apache.org/hadoop/HowToContribute"
   JENKINS=false
   BASEDIR=$(pwd)
+  RELOCATE_PATCH_DIR=false
 
   FINDBUGS_HOME=${FINDBUGS_HOME:-}
   ECLIPSE_HOME=${ECLIPSE_HOME:-}
@@ -607,6 +608,7 @@ function hadoop_usage
   echo "--eclipse-home=<path>  Eclipse home directory (default ECLIPSE_HOME environment
variable)"
   echo "--jira-cmd=<cmd>       The 'jira' command to use (default 'jira')"
   echo "--jira-password=<pw>   The password for the 'jira' command"
+  echo "--mv-patch-dir         Move the patch-dir into the basedir during cleanup."
   echo "--wget-cmd=<cmd>       The 'wget' command to use (default 'wget')"
 }
 
@@ -692,6 +694,9 @@ function parse_args
       --mvn-cmd=*)
         MVN=${i#*=}
       ;;
+      --mv-patch-dir)
+        RELOCATE_PATCH_DIR=true;
+      ;;
       --offline)
         OFFLINE=true
       ;;
@@ -2323,19 +2328,16 @@ function cleanup_and_exit
 {
   local result=$1
 
-  if [[ ${JENKINS} == "true" ]] ; then
-    if [[ -e "${PATCH_DIR}" ]] ; then
-      if [[ -d "${PATCH_DIR}" ]]; then
-        # if PATCH_DIR is already inside BASEDIR, then
-        # there is no need to move it since we assume that
-        # Jenkins or whatever already knows where it is at
-        # since it told us to put it there!
-        relative_patchdir >/dev/null
-        if [[ $? == 1 ]]; then
-          hadoop_debug "mv ${PATCH_DIR} ${BASEDIR}"
-          mv "${PATCH_DIR}" "${BASEDIR}"
-        fi
-      fi
+  if [[ ${JENKINS} == "true" && ${RELOCATE_PATCH_DIR} == "true" && \
+      -e ${PATCH_DIR} && -d ${PATCH_DIR} ]] ; then
+    # if PATCH_DIR is already inside BASEDIR, then
+    # there is no need to move it since we assume that
+    # Jenkins or whatever already knows where it is at
+    # since it told us to put it there!
+    relative_patchdir >/dev/null
+    if [[ $? == 1 ]]; then
+      hadoop_debug "mv ${PATCH_DIR} ${BASEDIR}"
+      mv "${PATCH_DIR}" "${BASEDIR}"
     fi
   fi
   big_console_header "Finished build."

http://git-wip-us.apache.org/repos/asf/hadoop/blob/10c922b5/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index ec11a02..6ca3f1e 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -107,6 +107,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-11884. test-patch.sh should pull the real findbugs version
     (Kengo Seki via aw)
 
+    HADOOP-11944. add option to test-patch to avoid relocating patch process
+    directory (Sean Busbey via aw)
+
   OPTIMIZATIONS
 
     HADOOP-11785. Reduce the number of listStatus operation in distcp


Mime
View raw message