diff --git build-support/scripts/test.sh build-support/scripts/test.sh
index 0fd500b..13b68b9 100755
--- build-support/scripts/test.sh
+++ build-support/scripts/test.sh
@@ -1,5 +1,9 @@
#!/bin/bash
+# Run HCatalog tests. This script intends to centralize the different commands
+# and options necessary to build and test HCatalog. It should be run before
+# committing patches, and from CI.
+
function run_cmd() {
echo "Running command: ${cmd}"
${cmd}
@@ -9,14 +13,31 @@ function run_cmd() {
fi
}
+if [ "${FORREST_HOME}" == "" ]; then
+ echo "required environment variable FORREST_HOME not set"
+ exit 1
+fi
+
umask 0022
+env
+
+cmd='ant clean src-release'
+run_cmd
+
+cd build
+tar -xzvf hcatalog-src-*.tar.gz
+cd hcatalog-src-*
+echo "Running tests from $(pwd)"
# Build with hadoop23, but do not run tests as they do not pass.
-cmd='ant clean package -Dmvn.hadoop.profile=hadoop23'
+cmd='ant -v clean package -Dmvn.hadoop.profile=hadoop23'
run_cmd
# Build and run tests with hadoop20. This must happen afterwards so test results
# are available for CI to publish.
-cmd='ant clean package test -Dtest.junit.output.format=xml'
+cmd='ant -v -Dtest.junit.output.format=xml clean package test'
+if [ "${HUDSON_URL}" == "https://builds.apache.org/" ]; then
+ cmd="${cmd} mvn-deploy"
+fi
run_cmd
diff --git build.xml build.xml
index 2fcb3ff..57353a1 100644
--- build.xml
+++ build.xml
@@ -354,12 +354,25 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -374,9 +387,12 @@
-
+
+
+
+
@@ -386,34 +402,18 @@
+
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -432,8 +432,8 @@
-
-
-
+
+
+
diff --git core/build.xml core/build.xml
index 6cd7441..66303cf 100644
--- core/build.xml
+++ core/build.xml
@@ -21,7 +21,7 @@
-
+
diff --git hcatalog-pig-adapter/build.xml hcatalog-pig-adapter/build.xml
index bdd9605..3d0d86f 100644
--- hcatalog-pig-adapter/build.xml
+++ hcatalog-pig-adapter/build.xml
@@ -21,7 +21,7 @@
-
+
diff --git server-extensions/build.xml server-extensions/build.xml
index 8351f27..c929ddf 100644
--- server-extensions/build.xml
+++ server-extensions/build.xml
@@ -21,7 +21,7 @@
-
+
diff --git shims/build.xml shims/build.xml
index 89a8f5c..8978949 100644
--- shims/build.xml
+++ shims/build.xml
@@ -19,7 +19,7 @@
-
+
diff --git storage-handlers/hbase/build.xml storage-handlers/hbase/build.xml
index 558e9c8..fa2f508 100644
--- storage-handlers/hbase/build.xml
+++ storage-handlers/hbase/build.xml
@@ -217,6 +217,6 @@
-
+
diff --git webhcat/java-client/build.xml webhcat/java-client/build.xml
index 7c12468..a8db670 100644
--- webhcat/java-client/build.xml
+++ webhcat/java-client/build.xml
@@ -20,7 +20,7 @@
-
+
diff --git webhcat/svr/build.xml webhcat/svr/build.xml
index 070d9be..b1ceba4 100644
--- webhcat/svr/build.xml
+++ webhcat/svr/build.xml
@@ -20,7 +20,7 @@
-
+