incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tra...@apache.org
Subject svn commit: r1418158 - in /incubator/hcatalog/trunk: ./ ant/ build-support/ant/ build-support/scripts/ core/ hcatalog-pig-adapter/ server-extensions/ shims/ storage-handlers/hbase/ webhcat/java-client/ webhcat/svr/
Date Fri, 07 Dec 2012 01:26:30 GMT
Author: travis
Date: Fri Dec  7 01:26:26 2012
New Revision: 1418158

URL: http://svn.apache.org/viewvc?rev=1418158&view=rev
Log:
HCATALOG-558 Update test.sh to test from an extracted src-release

Added:
    incubator/hcatalog/trunk/build-support/ant/
    incubator/hcatalog/trunk/build-support/ant/build-common.xml
      - copied, changed from r1418141, incubator/hcatalog/trunk/build-common.xml
    incubator/hcatalog/trunk/build-support/ant/checkstyle.xml
      - copied unchanged from r1418141, incubator/hcatalog/trunk/ant/checkstyle.xml
    incubator/hcatalog/trunk/build-support/ant/deploy.xml
      - copied unchanged from r1418141, incubator/hcatalog/trunk/ant/deploy.xml
    incubator/hcatalog/trunk/build-support/ant/findbugs.xml
      - copied unchanged from r1418141, incubator/hcatalog/trunk/ant/findbugs.xml
    incubator/hcatalog/trunk/build-support/ant/test.xml
      - copied unchanged from r1418141, incubator/hcatalog/trunk/ant/test.xml
Removed:
    incubator/hcatalog/trunk/ant/
    incubator/hcatalog/trunk/build-common.xml
Modified:
    incubator/hcatalog/trunk/CHANGES.txt
    incubator/hcatalog/trunk/build-support/scripts/test.sh
    incubator/hcatalog/trunk/build.xml
    incubator/hcatalog/trunk/core/build.xml
    incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml
    incubator/hcatalog/trunk/server-extensions/build.xml
    incubator/hcatalog/trunk/shims/build.xml
    incubator/hcatalog/trunk/storage-handlers/hbase/build.xml
    incubator/hcatalog/trunk/webhcat/java-client/build.xml
    incubator/hcatalog/trunk/webhcat/svr/build.xml

Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Fri Dec  7 01:26:26 2012
@@ -44,6 +44,8 @@ Trunk (unreleased changes)
   HCAT-427 Document storage-based authorization (lefty via gates)
 
   IMPROVEMENTS
+  HCAT-558 Update test.sh to test from an extracted src-release (traviscrawford)
+
   HCAT-557 add modules to maven pom (toffer)
 
   HCAT-542 Fix 0.23 build and dependencies (traviscrawford)

Copied: incubator/hcatalog/trunk/build-support/ant/build-common.xml (from r1418141, incubator/hcatalog/trunk/build-common.xml)
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build-support/ant/build-common.xml?p2=incubator/hcatalog/trunk/build-support/ant/build-common.xml&p1=incubator/hcatalog/trunk/build-common.xml&r1=1418141&r2=1418158&rev=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build-common.xml (original)
+++ incubator/hcatalog/trunk/build-support/ant/build-common.xml Fri Dec  7 01:26:26 2012
@@ -29,10 +29,10 @@
     <equals arg1="${_mvn.hadoop.profile}" arg2="hadoop23"/>
   </condition>
 
-  <import file="${path.to.basedir}/ant/checkstyle.xml"/>
-  <import file="${path.to.basedir}/ant/deploy.xml"/>
-  <import file="${path.to.basedir}/ant/findbugs.xml"/>
-  <import file="${path.to.basedir}/ant/test.xml"/>
+  <import file="checkstyle.xml"/>
+  <import file="deploy.xml"/>
+  <import file="findbugs.xml"/>
+  <import file="test.xml"/>
 
   <macrodef name="_javac">
     <attribute name="srcDir"/>

Modified: incubator/hcatalog/trunk/build-support/scripts/test.sh
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build-support/scripts/test.sh?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build-support/scripts/test.sh (original)
+++ incubator/hcatalog/trunk/build-support/scripts/test.sh Fri Dec  7 01:26:26 2012
@@ -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
 

Modified: incubator/hcatalog/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build.xml?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build.xml (original)
+++ incubator/hcatalog/trunk/build.xml Fri Dec  7 01:26:26 2012
@@ -354,12 +354,25 @@
         </chmod>
 
         <!--package storage-handlers -->
-
         <property name="handlers.dir" value="${dist.dir}/share/hcatalog/storage-handlers"/>
         <mkdir dir="${handlers.dir}"/>
         <ant target="package" dir="storage-handlers/hbase" inheritAll="false">
             <property name="dist.handlers.dir" value="${handlers.dir}"/>
         </ant>
+
+        <!--
+        While ant has a native tar task, we call out to the command-line
+        tar command because it preserves file permissions of our carefully
+        constructed package dir.
+        -->
+        <exec executable="tar">
+            <arg value="-C"/>
+            <arg value="${build.dir}"/>
+            <arg value="-czf"/>
+            <arg value="${build.dir}/${final.name}.tar.gz"/>
+            <arg value="${final.name}"/>
+        </exec>
+        <checksum file="${build.dir}/${final.name}.tar.gz" forceOverwrite="yes"/>
     </target>
 
     <target name="releaseaudit" description="Release Audit activities">
@@ -374,9 +387,12 @@
     <!-- ================================================================== -->
     <target name="src-release" depends="clean" description="Source distribution">
         <mkdir dir="${build.dir}"/>
-        <tar compression="gzip" longfile="gnu"
-             destfile="${build.dir}/${ant.project.name}-src-${hcatalog.version}.tar.gz">
+        <property name="src-release-tarball"
+                  value="${build.dir}/${ant.project.name}-src-${hcatalog.version}.tar.gz"/>
+        <tar compression="gzip" longfile="gnu" destfile="${src-release-tarball}">
             <tarfileset dir="${basedir}" mode="644" prefix="${ant.project.name}-src-${hcatalog.version}">
+                <include name="build-support/**"/>
+                <exclude name="build-support/scripts/**"/>
                 <include name="conf/**"/>
                 <include name="core/**"/>
                 <include name="hcatalog-pig-adapter/**"/>
@@ -386,34 +402,18 @@
                 <include name="shims/**"/>
                 <include name="src/**"/>
                 <include name="storage-handlers/**"/>
+                <include name="*.properties"/>
                 <include name="*.txt"/>
                 <include name="*.xml"/>
                 <include name="KEYS"/>
             </tarfileset>
-            <tarfileset dir="" mode="755" prefix="${ant.project.name}-src-${hcatalog.version}">
-                <include name="scripts/**"/>
+            <tarfileset dir="${basedir}" mode="755" prefix="${ant.project.name}-src-${hcatalog.version}">
                 <include name="bin/**"/>
+                <include name="build-support/scripts/**"/>
+                <include name="scripts/**"/>
             </tarfileset>
         </tar>
-    </target>
-
-    <!-- ================================================================== -->
-    <!-- Make release binary packages                                       -->
-    <!-- ================================================================== -->
-    <target name="tar" depends="package" description="Create release tarball">
-        <tar compression="gzip" longfile="gnu" destfile="${build.dir}/${final.name}.tar.gz">
-            <tarfileset dir="${build.dir}" mode="664">
-                <include name="${final.name}/**"/>
-                <exclude name="${final.name}/bin/*"/>
-                <exclude name="${final.name}/sbin/*"/>
-                <exclude name="${final.name}/share/hcatalog/scripts/*"/>
-            </tarfileset>
-            <tarfileset dir="${build.dir}" mode="755">
-                <include name="${final.name}/bin/*"/>
-                <include name="${final.name}/sbin/*"/>
-                <include name="${final.name}/share/hcatalog/scripts/*"/>
-            </tarfileset>
-        </tar>
+        <checksum file="${src-release-tarball}" forceOverwrite="yes"/>
     </target>
 
     <!-- ================================================================== -->
@@ -432,8 +432,8 @@
         <ant dir="${test.e2e.dir}" target="deploy"/>
     </target>
 
-    <import file="ant/deploy.xml"/>
-    <import file="ant/findbugs.xml"/>
-    <import file="ant/test.xml"/>
+    <import file="build-support/ant/deploy.xml"/>
+    <import file="build-support/ant/findbugs.xml"/>
+    <import file="build-support/ant/test.xml"/>
 
 </project>

Modified: incubator/hcatalog/trunk/core/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/core/build.xml?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/core/build.xml (original)
+++ incubator/hcatalog/trunk/core/build.xml Fri Dec  7 01:26:26 2012
@@ -21,7 +21,7 @@
   <property name="path.to.basedir" value="${basedir}/.."/>
   <property name="pom.file" location="pom.xml"/>
 
-  <import file="../build-common.xml"/>
+  <import file="${path.to.basedir}/build-support/ant/build-common.xml"/>
 
   <path id="compile.class.path">
     <fileset dir="${build.dir}/lib/compile"/>

Modified: incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml (original)
+++ incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml Fri Dec  7 01:26:26 2012
@@ -21,7 +21,7 @@
   <property name="path.to.basedir" value="${basedir}/.."/>
   <property name="pom.file" location="pom.xml"/>
 
-  <import file="../build-common.xml"/>
+  <import file="${path.to.basedir}/build-support/ant/build-common.xml"/>
 
   <path id="compile.class.path">
     <fileset dir="${build.dir}/lib/compile"/>

Modified: incubator/hcatalog/trunk/server-extensions/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/server-extensions/build.xml?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/server-extensions/build.xml (original)
+++ incubator/hcatalog/trunk/server-extensions/build.xml Fri Dec  7 01:26:26 2012
@@ -21,7 +21,7 @@
     <property name="path.to.basedir" value="${basedir}/.."/>
     <property name="pom.file" location="pom.xml"/>
 
-    <import file="../build-common.xml"/>
+    <import file="${path.to.basedir}/build-support/ant/build-common.xml"/>
 
     <path id="compile.class.path">
         <fileset dir="${build.dir}/lib/compile"/>

Modified: incubator/hcatalog/trunk/shims/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/shims/build.xml?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/shims/build.xml (original)
+++ incubator/hcatalog/trunk/shims/build.xml Fri Dec  7 01:26:26 2012
@@ -19,7 +19,7 @@
 
 <project name="shims" default="jar">
   <property name="path.to.basedir" value="${basedir}/.."/>
-  <import file="${path.to.basedir}/build-common.xml"/>
+  <import file="${path.to.basedir}/build-support/ant/build-common.xml"/>
 
   <path id="compile.class.path">
     <fileset dir="${path.to.basedir}/core/build/lib/compile"/>

Modified: incubator/hcatalog/trunk/storage-handlers/hbase/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/storage-handlers/hbase/build.xml?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/storage-handlers/hbase/build.xml (original)
+++ incubator/hcatalog/trunk/storage-handlers/hbase/build.xml Fri Dec  7 01:26:26 2012
@@ -217,6 +217,6 @@
         </copy>
     </target>
 
-    <import file="../../ant/deploy.xml"/>
+    <import file="${path.to.basedir}/build-support/ant/deploy.xml"/>
 
 </project>

Modified: incubator/hcatalog/trunk/webhcat/java-client/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/java-client/build.xml?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/webhcat/java-client/build.xml (original)
+++ incubator/hcatalog/trunk/webhcat/java-client/build.xml Fri Dec  7 01:26:26 2012
@@ -20,7 +20,7 @@
   <property name="path.to.basedir" location="${basedir}/../.."/>
   <property name="pom.file" location="pom.xml"/>
 
-  <import file="../../build-common.xml"/>
+  <import file="${path.to.basedir}/build-support/ant/build-common.xml"/>
 
   <path id="compile.class.path">
     <fileset dir="${build.dir}/lib/compile"/>

Modified: incubator/hcatalog/trunk/webhcat/svr/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/svr/build.xml?rev=1418158&r1=1418157&r2=1418158&view=diff
==============================================================================
--- incubator/hcatalog/trunk/webhcat/svr/build.xml (original)
+++ incubator/hcatalog/trunk/webhcat/svr/build.xml Fri Dec  7 01:26:26 2012
@@ -20,7 +20,7 @@
   <property name="path.to.basedir" location="${basedir}/../.."/>
   <property name="pom.file" location="pom.xml"/>
 
-  <import file="../../build-common.xml"/>
+  <import file="${path.to.basedir}/build-support/ant/build-common.xml"/>
 
   <path id="compile.class.path">
     <fileset dir="${build.dir}/lib/compile"/>



Mime
View raw message