You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pv...@apache.org on 2018/02/21 13:55:35 UTC

hive git commit: HIVE-18706: Ensure each Yetus execution has its own separate working dir (Adam Szita, reviewed by Peter Vary)

Repository: hive
Updated Branches:
  refs/heads/master 2d2311c0e -> 102731f6e


HIVE-18706: Ensure each Yetus execution has its own separate working dir (Adam Szita, reviewed by Peter Vary)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/102731f6
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/102731f6
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/102731f6

Branch: refs/heads/master
Commit: 102731f6e713fd8aedc9bb70f3367fe754559da5
Parents: 2d2311c
Author: Peter Vary <pv...@cloudera.com>
Authored: Wed Feb 21 14:54:51 2018 +0100
Committer: Peter Vary <pv...@cloudera.com>
Committed: Wed Feb 21 14:54:51 2018 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/hive/ptest/execution/YetusPhase.java  | 4 ++--
 testutils/ptest2/src/main/resources/source-prep.vm             | 6 +++---
 testutils/ptest2/src/main/resources/yetus-exec.vm              | 3 ++-
 3 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/102731f6/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/YetusPhase.java
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/YetusPhase.java b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/YetusPhase.java
index 26545df..309d99d 100644
--- a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/YetusPhase.java
+++ b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/YetusPhase.java
@@ -57,12 +57,12 @@ public class YetusPhase extends Phase {
 
     super(hostExecutors, localCommandFactory, templateDefaults, logger);
     this.mPatchFile = patchFile;
-    this.mWorkingDir = new File(workingDir, YETUS_OUTPUT_FOLDER);
+    this.buildTag = templateDefaults.get("buildTag");
+    this.mWorkingDir = new File(workingDir, YETUS_OUTPUT_FOLDER + "_" + this.buildTag);
     this.mLogFile = new File(logDir, YETUS_LOG_FILE);
     this.mOutputDir = new File(logDir, YETUS_OUTPUT_FOLDER);
     this.mScratchDir = scratchDir;
     this.conf = configuration;
-    this.buildTag = templateDefaults.get("buildTag");
     this.buildUrl = conf.getLogsURL() + "/" + this.buildTag + "/";
 
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/102731f6/testutils/ptest2/src/main/resources/source-prep.vm
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/main/resources/source-prep.vm b/testutils/ptest2/src/main/resources/source-prep.vm
index d8dd202..c7e06b9 100644
--- a/testutils/ptest2/src/main/resources/source-prep.vm
+++ b/testutils/ptest2/src/main/resources/source-prep.vm
@@ -78,11 +78,11 @@ cd $workingDir/
     echo "Unknown repository type '${repositoryType}'"
     exit 1
   fi
-  rm -rf ../yetus
-  mkdir ../yetus
+  rm -rf ../yetus_${buildTag}
+  mkdir ../yetus_${buildTag}
   #Wait until git gc finishes in the background before proceeding:
   while ! git gc 2>/dev/null; do sleep 1s ; done
-  cp -R . ../yetus
+  cp -R . ../yetus_${buildTag}
   mkdir $logDir/yetus
   patchCommandPath=$workingDir/scratch/smart-apply-patch.sh
   patchFilePath=$workingDir/scratch/build.patch

http://git-wip-us.apache.org/repos/asf/hive/blob/102731f6/testutils/ptest2/src/main/resources/yetus-exec.vm
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/main/resources/yetus-exec.vm b/testutils/ptest2/src/main/resources/yetus-exec.vm
index a5327ca..7465391 100644
--- a/testutils/ptest2/src/main/resources/yetus-exec.vm
+++ b/testutils/ptest2/src/main/resources/yetus-exec.vm
@@ -24,6 +24,7 @@ export JAVA_HOME=${javaHome}
 export PATH=$JAVA_HOME/bin/:$PATH
 ./dev-support/test-patch.sh ${patchFile} --jenkins --jira-base-url=${jiraUrl} --jira-user=${jiraUser} \
  --jira-password=${jiraPass} --patch-dir=${outputDir} --build-url=${buildUrl} --build-url-console=${buildUrlLog} \
- --build-url-artifacts=${buildUrlOutputDir} 2>&1 > ${logFile}
+ --build-url-artifacts=${buildUrlOutputDir} 2>&1 > ${logFile} || true
 popd
+rm -rf ${workingDir}