You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by br...@apache.org on 2015/03/10 17:49:06 UTC
svn commit: r1665613 - in /hive/trunk:
dev-support/jenkins-execute-hms-test.sh
testutils/metastore/execute-test-on-lxc.sh
Author: brock
Date: Tue Mar 10 16:49:06 2015
New Revision: 1665613
URL: http://svn.apache.org/r1665613
Log:
HIVE-9909 - Specify hive branch to use on jenkins hms tests (Sergio Pena via Brock)
Modified:
hive/trunk/dev-support/jenkins-execute-hms-test.sh
hive/trunk/testutils/metastore/execute-test-on-lxc.sh
Modified: hive/trunk/dev-support/jenkins-execute-hms-test.sh
URL: http://svn.apache.org/viewvc/hive/trunk/dev-support/jenkins-execute-hms-test.sh?rev=1665613&r1=1665612&r2=1665613&view=diff
==============================================================================
--- hive/trunk/dev-support/jenkins-execute-hms-test.sh (original)
+++ hive/trunk/dev-support/jenkins-execute-hms-test.sh Tue Mar 10 16:49:06 2015
@@ -62,8 +62,8 @@ PUBLISH_VARS=(
BUILD_STATUS=0
PATCH_URL="${JIRA_ROOT_URL}${PATCH_URL}"
JIRA_URL="${JIRA_ROOT_URL}/jira"
-REPO_NAME="trunk"
-REPO="trunk"
+REPO_NAME="trunk" # not used, but JIRAService asks for it
+REPO="trunk" # not used, but JIRAService asks for it
TESTS_EXECUTED=0
FAILED_TESTS=()
MESSAGES=()
@@ -74,7 +74,7 @@ build_ptest2() {
test -d $path || mkdir -p $path
rm -rf $path/ptest2
- svn co http://svn.apache.org/repos/asf/hive/trunk/testutils/ptest2/ $path/ptest2
+ svn co http://svn.apache.org/repos/asf/hive/$BRANCH/testutils/ptest2/ $path/ptest2
cd $path/ptest2
mvn clean package -DskipTests -Drat.numUnapprovedLicenses=1000 -Dmaven.repo.local=$WORKSPACE/.m2
@@ -136,8 +136,8 @@ wget "${PATCH_URL}" -O /tmp/${JIRA_NAME}
if cat /tmp/${JIRA_NAME}.patch | grep "^diff.*metastore/scripts/upgrade/" >/dev/null; then
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $SSH_KEY $SSH_HOST "
rm -rf metastore/ &&
- svn co http://svn.apache.org/repos/asf/hive/trunk/testutils/metastore metastore &&
- sudo bash -x metastore/execute-test-on-lxc.sh --patch \"${PATCH_URL}\"
+ svn co http://svn.apache.org/repos/asf/hive/$BRANCH/testutils/metastore metastore &&
+ sudo bash -x metastore/execute-test-on-lxc.sh --patch \"${PATCH_URL}\" --branch $BRANCH
"
ret=$?
if [[ $ret = 0 ]]; then
Modified: hive/trunk/testutils/metastore/execute-test-on-lxc.sh
URL: http://svn.apache.org/viewvc/hive/trunk/testutils/metastore/execute-test-on-lxc.sh?rev=1665613&r1=1665612&r2=1665613&view=diff
==============================================================================
--- hive/trunk/testutils/metastore/execute-test-on-lxc.sh (original)
+++ hive/trunk/testutils/metastore/execute-test-on-lxc.sh Tue Mar 10 16:49:06 2015
@@ -40,17 +40,21 @@ fail() {
exit 1
}
-[[ $# != 2 ]] && fail "Usage: $0 --patch PATH_URL"
+[[ $# != 4 ]] && fail "Usage: $0 --patch PATH_URL --branch BRANCH"
PATCH_URL=
+BRANCH=
while [[ $# -gt 0 ]]; do
if [[ $1 = "--patch" ]]; then
PATCH_URL=$2
+ elif [[ $1 = "--branch" ]]; then
+ BRANCH=$2
fi
shift 2
done
+test -n "$BRANCH" || fail "--branch value is required."
test -n "$PATCH_URL" || fail "--patch value is required."
get_supported_dbs() {
@@ -85,14 +89,14 @@ lxc_start() {
}
lxc_prepare() {
+ echo "Downloading hive source code from SVN, branch='$BRANCH' ..."
lxc-attach -n $1 -- rm -rf /tmp/hive
lxc-attach -n $1 -- mkdir /tmp/hive
- # TODO: Copy hive code to the container using SCP.
- lxc-attach -n $1 -- svn co http://svn.apache.org/repos/asf/hive/trunk /tmp/hive
+ lxc-attach -n $1 -- svn co http://svn.apache.org/repos/asf/hive/$BRANCH /tmp/hive >/dev/null
lxc-attach -n $1 -- wget $PATCH_URL -O /tmp/hive/hms.patch
- lxc-attach -n $1 -- patch -d /tmp/hive -p1 -i /tmp/hive/hms.patch
+ lxc-attach -n $1 -- patch -s -N -d /tmp/hive -p1 -i /tmp/hive/hms.patch
}
lxc_print_metastore_log() {
@@ -100,7 +104,6 @@ lxc_print_metastore_log() {
}
run_tests() {
- #lxc-attach -n $1 -- bash /tmp/dev-support/tests/metastore-upgrade/metastore-upgrade-test.sh --db $1
lxc-attach -n $1 -- bash /tmp/hive/testutils/metastore/metastore-upgrade-test.sh --db $1
}