blob: ed85eba5fa83098c7419c16a3a7acba84d105069 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="TestHarnessTempletonTests" default="test">
<!-- Separate property name for udfs' build.xml -->
<property name="e2e.lib.dir" value="${basedir}/lib"/>
<property name="test.src" value="${basedir}/tests"/>
<property name="driver.src" value="${basedir}/drivers"/>
<property name="harness.dir" value="${basedir}/../harness"/>
<property name="inpdir.local" value="${basedir}/inpdir/"/>
<property name="test.location" value="${basedir}/testWorkDir"/>
<property name="driver.src" value="${basedir}/drivers"/>
<!-- Check that the necessary properties are setup -->
<target name="property-check">
<fail message="Please set the property harness.webhdfs.url to the namenode base url of the cluster"
unless="harness.webhdfs.url"/>
<fail message="Please set the property harness.templeton.url to the templeton server base url of the cluster"
unless="harness.templeton.url"/>
<fail message="Please set the property inpdir.hdfs to the test input directory on hdfs"
unless="inpdir.hdfs"/>
</target>
<!-- Prep the test area -->
<target name="init-test">
<mkdir dir="${test.location}"/>
</target>
<target name="test" depends="property-check, init-test">
<property name="tests.to.run" value=""/>
<exec executable="${harness.dir}/test_harness.pl" dir="${test.location}" failonerror="true">
<env key="HARNESS_ROOT" value="${harness.dir}"/>
<env key="DRIVER_ROOT" value="${basedir}/drivers"/>
<env key="TH_WORKING_DIR" value="${test.location}"/>
<env key="TH_INPDIR_LOCAL" value="${inpdir.local}"/>
<env key="TH_INPDIR_HDFS" value="${inpdir.hdfs}"/>
<env key="TH_OUT" value="."/>
<env key="TH_ROOT" value="."/>
<env key="WEBHDFS_URL" value="${harness.webhdfs.url}"/>
<env key="TEMPLETON_URL" value="${harness.templeton.url}"/>
<env key="USER_NAME" value="${test.user.name}"/>
<env key="HARNESS_CONF" value="${basedir}/conf/default.conf"/>
<env key="SECURE_MODE" value="${secure.mode}"/>
<arg line="${tests.to.run}"/>
<arg value="${basedir}/tests/serverstatus.conf"/>
<arg value="${basedir}/tests/ddl.conf"/>
<arg value="${basedir}/tests/jobsubmission.conf"/>
</exec>
</target>
<target name="test-hcat-authorization" depends="property-check, init-test">
<property name="tests.to.run" value=""/>
<exec executable="${harness.dir}/test_harness.pl" dir="${test.location}" failonerror="true">
<env key="HARNESS_ROOT" value="${harness.dir}"/>
<env key="DRIVER_ROOT" value="${basedir}/drivers"/>
<env key="TH_WORKING_DIR" value="${test.location}"/>
<env key="TH_INPDIR_LOCAL" value="${inpdir.local}"/>
<env key="TH_INPDIR_HDFS" value="${inpdir.hdfs}"/>
<env key="TH_OUT" value="."/>
<env key="TH_ROOT" value="."/>
<env key="WEBHDFS_URL" value="${harness.webhdfs.url}"/>
<env key="TEMPLETON_URL" value="${harness.templeton.url}"/>
<env key="USER_NAME" value="${test.user.name}"/>
<env key="GROUP_NAME" value="${test.group.name}"/>
<env key="GROUP_USER_NAME" value="${test.group.user.name}"/>
<env key="OTHER_USER_NAME" value="${test.other.user.name}"/>
<env key="HARNESS_CONF" value="${basedir}/conf/default.conf"/>
<env key="SECURE_MODE" value="${secure.mode}"/>
<env key="KEYTAB_DIR" value="${keytab.dir}"/>
<arg line="${tests.to.run}"/>
<arg value="${basedir}/tests/hcatperms.conf"/>
</exec>
</target>
</project>