Author: vhalbert(a)redhat.com
Date: 2010-04-09 15:29:27 -0400 (Fri, 09 Apr 2010)
New Revision: 2043
Modified:
trunk/test-integration/db/pom.xml
trunk/test-integration/db/runclienttest.sh
trunk/test-integration/db/src/assembly/binaries.xml
trunk/test-integration/db/src/main/resources/ctc_tests/ctc-test.properties
trunk/test-integration/db/src/main/resources/ctc_tests/ctc.xml
Log:
Teiid-773 - changes package the ctc kit, needed to add the version specific ant
dependencies, otherwise it was pulling ant 1.6 (instead of 1.7)
Modified: trunk/test-integration/db/pom.xml
===================================================================
--- trunk/test-integration/db/pom.xml 2010-04-09 17:39:12 UTC (rev 2042)
+++ trunk/test-integration/db/pom.xml 2010-04-09 19:29:27 UTC (rev 2043)
@@ -49,6 +49,8 @@
<type>test-jar</type>
<scope>compile</scope>
</dependency>
+
+
<dependency>
<groupId>org.jboss.teiid</groupId>
@@ -66,15 +68,21 @@
</dependency>
<dependency>
- <groupId>ant-contrib</groupId>
- <artifactId>cpptasks</artifactId>
- <version>1.0b3</version>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.7.0</version>
</dependency>
+
<dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ <dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
- <exclusions>
+ <exclusions>
<exclusion>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
@@ -83,6 +91,19 @@
</dependency>
+ <dependency>
+ <groupId>ant-contrib</groupId>
+ <artifactId>cpptasks</artifactId>
+ <version>1.0b3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+
<!-- DBUnit dependencies -->
<dependency>
@@ -417,8 +438,7 @@
<!-- optional properties -->
<property name="config.file"
value="${config.file}"></property>
<property name="query.scenario.classname"
value="${query.scenario.classname}"></property>
- <property name="third.party.jars.dir"
value="${third.party.jars.dir}"></property>
- <property name="proj.dir" value="${project.basedir}"
/>
+ <property name="proj.dir"
value="${project.basedir}/target/" />
<property name="usedatasources"
value="${usedatasources}"></property>
<property name="datasourceloc"
value="${datasourceloc}"></property>
Modified: trunk/test-integration/db/runclienttest.sh
===================================================================
--- trunk/test-integration/db/runclienttest.sh 2010-04-09 17:39:12 UTC (rev 2042)
+++ trunk/test-integration/db/runclienttest.sh 2010-04-09 19:29:27 UTC (rev 2043)
@@ -1,27 +1,168 @@
#!/bin/sh
-# This script will run the client tests based on the
-# below project scenarios.
+# This script will run the client tests
-# The scenario
+#============================
+# REQUIRED PROPERTIES
+#
+# - USEDATASOURCES - indicates the datasource(s) (common separated) to use, this is the
directory located inside directory datasourceloc
+$
-SC_DIR=./src/main/resources/ctc_tests/scenarios
-QS_DIR=./src/main/resources/ctc_tests/queries
-# VDB_DIR=./src/main/resources/ctc_tests/vdbs
+#============================
+# OPTIONAL PROPERTIES
+#
+# (if not set, will default to files within the db project)
+# - QUERYSETDIR - directory location where the test querties can be found]
+# - SCENARIODIR - directory location where the scenario files found and determine which
query sets and vdbs to use,
+# - DATASOURCEDIR - root directory location to find the various datasources to use
+# - CONFIGFILE - specify the configuration file to use (override ctc-test.properties)
-VDB_DIR=./src/main/resources/transactions
+######################################################
+# DEBUGGING OPTION
+#
+# JBEDSP_DEBUG - uncomment to enable the output of debug messages.
+#
+# JBEDSP_DEBUG=true
+#
+# the property that defines which datasources to use. these names must exist as
directories within the datasource loc.
+if [ -z "$USEDATASOURCES" ]
+ then
+
+ echo ""
+ echo "Property <USEDATASOURCES> must be specified"
+ echo "Exit"
+ exit
+fi
-if [ -z "${datasourceloc}" ]
+
+
+#if [ -z "${vdb.artifacts.dir}" ]
+# then
+#
+# vdb.artifacts.dir='./src/main/resources/transactions'
+#
+#fi
+
+if [ -z "${QUERYSETDIR}" ]
then
- datasourceloc='./src/main/resources/datasources'
+ QUERYSETDIR='./src/main/resources/ctc_tests/queries'
+
fi
-echo "Use Datasources: ${DS1} and ${DS2} loc: ${datasourceloc}"
+if [ -z "${SCENARIODIR}" ]
+ then
+
+ SCENARIODIR='./src/main/resources/ctc_tests/scenarios'
+
+fi
-mvn integration-test -Dusedatasources=${DS1},${DS2} -Ddatasourceloc=${datasourceloc}
-Dscenario.dir=$SC_DIR -Dqueryset.artifacts.dir=$QS_DIR -Dvdb.artifacts.dir=$VDB_DIR
-Prunclienttests
+if [ -z "${DATASOURCEDIR}" ]
+ then
+
+ DATASOURCEDIR='./src/main/resources/datasources'
+fi
+echo "Use Datasources: ${USEDATASOURCES} loc: ${DATASOURCEDIR}"
+#--------------------
+
+# resolve links - $0 may be a softlink
+LOC="$0"
+
+while [ -h "$LOC" ] ; do
+ ls=`ls -ld "$LOC"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '.*/.*' > /dev/null; then
+ LOC="$link"
+ else
+ LOC=`dirname "$LOC"`/"$link"
+ fi
+done
+
+LOCDIR=`dirname "$LOC"`
+PRGDIR=`cd "$LOCDIR"; pwd`
+
+cd "${PRGDIR}"
+
+echo "============================"
+echo "Running tests from ${PRGDIR}"
+echo "============================"
+
+# check if running from the kit
+if [ -f "${PRGDIR}/resources/ctc_tests/ctc.xml" ]; then
+ CTCXML=${PRGDIR}/resources/ctc_tests/ctc.xml
+else
+ CTCXML='./src/main/resources/ctc_tests/ctc.xml'
+
+fi
+
+
+ANT_ARGS=" -Dusedatasources=${USEDATASOURCES} "
+ANT_ARGS="${ANT_ARGS} -Ddatasourceloc=${DATASOURCEDIR}"
+ANT_ARGS="${ANT_ARGS} -Dscenario.dir=${SCENARIODIR}"
+ANT_ARGS="${ANT_ARGS} -Dqueryset.artifacts.dir=${QUERYSETDIR}"
+#ANT_ARGS="${ANT_ARGS} -Dvdb.artifacts.dir=${vdb.artifacts.dir}"
+ANT_ARGS="${ANT_ARGS} -Dproj.dir=${PRGDIR}"
+
+
+
+if [ ! -z "${XMLCLZZ}" ]
+ then
+
+ ANT_ARGS="${ANT_ARGS} -Dquery.scenario.classname=$XMLCLZZ"
+
+fi
+
+if [ ! -z "${CONFIGFILE}" ]
+ then
+
+ ANT_ARGS="${ANT_ARGS} -Dconfig.file=${CONFIGFILE}"
+
+fi
+
+if [ ! -z "${PROPFILE}" ]
+ then
+
+ ANT_ARGS=" -propertyfile $PROPFILE $ANT_ARGS "
+
+fi
+
+
+ANT_OPTS="-Xmx512m"
+ANT_HOME=${PRGDIR}/ant
+
+# uncomment for additional debugging info in the logfile
+# turn on debug for additional debugging info in the logfile
+if [ -n "$JBEDSP_DEBUG" ]; then
+ ANT_ARGS="${ANT_ARGS} -verbose"
+ fi
+
+if [ ! -x "${PRGDIR}/log" ]; then
+ echo "Create ${PRGDIR}/log directory"
+ mkdir "${PRGDIR}"/log
+fi
+
+if [ -n "${JAVA_OPTS}" ]; then
+ ANT_OPTS="${JAVA_OPTS} $ANT_OPTS "
+fi
+
+CP="${PRGDIR}:${PRGDIR}/ant/*"
+
+LOGLEVEL=info
+
+echo "ANT BUILDFILE=${CTCXML}"
+echo "ANT_HOME=${ANT_HOME}"
+echo "ANT_ARGS=${ANT_ARGS}"
+echo "CP=$CP"
+
+java -cp "${CP}" -Dant.home="${ANT_HOME}" $ANT_OPTS
org.apache.tools.ant.Main $ANT_ARGS -buildfile ${CTCXML}
+
+
+
+
+
+
Modified: trunk/test-integration/db/src/assembly/binaries.xml
===================================================================
--- trunk/test-integration/db/src/assembly/binaries.xml 2010-04-09 17:39:12 UTC (rev
2042)
+++ trunk/test-integration/db/src/assembly/binaries.xml 2010-04-09 19:29:27 UTC (rev
2043)
@@ -10,8 +10,63 @@
<format>zip</format>
</formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <baseDirectory>server</baseDirectory>
+
+ <dependencySets>
+
+ <dependencySet>
+ <outputDirectory>/ant</outputDirectory>
+
+ <useProjectArtifact>false</useProjectArtifact>
+ <useTransitiveDependencies>true</useTransitiveDependencies>
+ <useTransitiveFiltering>false</useTransitiveFiltering>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <unpack>false</unpack>
+
+ <includes>
+ <include>org.apache.ant:ant</include>
+ <include>org.apache.ant:ant-launcher</include>
+ <include>ant-contrib:cpptasks</include>
+ <include>ant-contrib:ant-contrib</include>
+ </includes>
+
+ </dependencySet>
+
+
+ <dependencySet>
+ <outputDirectory>/lib</outputDirectory>
+
+ <useProjectArtifact>false</useProjectArtifact>
+ <useTransitiveDependencies>true</useTransitiveDependencies>
+ <useTransitiveFiltering>false</useTransitiveFiltering>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <unpack>false</unpack>
+
+ <includes>
+ <include>commons-collections:commons-collections</include>
+ <include>org.slf4j:slf4j-api</include>
+ <include>org.jboss.teiid:test-integration-common</include>
+ <include>org.jboss.teiid:teiid-common-core</include>
+ <include>org.jboss.teiid:teiid-adminshell</include>
+ <include>org.jboss.teiid:teiid-engine</include>
+ <include>log4j:log4j</include>
+ <include>junit:junit</include>
+ <include>jdom:jdom</include>
+ </includes>
+
+ </dependencySet>
+ </dependencySets>
+
<fileSets>
<fileSet>
+
+ <includes>
+ <include>runclienttest.*</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
<directory>src/main/resources</directory>
<outputDirectory>resources</outputDirectory>
@@ -19,7 +74,7 @@
<fileSet>
<directory>${project.build.directory}</directory>
- <outputDirectory>ctc-client</outputDirectory>
+ <outputDirectory>lib</outputDirectory>
<includes>
<include>*.jar</include>
</includes>
@@ -27,4 +82,6 @@
</fileSets>
+
+
</assembly>
\ No newline at end of file
Modified: trunk/test-integration/db/src/main/resources/ctc_tests/ctc-test.properties
===================================================================
--- trunk/test-integration/db/src/main/resources/ctc_tests/ctc-test.properties 2010-04-09
17:39:12 UTC (rev 2042)
+++ trunk/test-integration/db/src/main/resources/ctc_tests/ctc-test.properties 2010-04-09
19:29:27 UTC (rev 2043)
@@ -25,7 +25,7 @@
#
# where to find the vdb's, which is used to define the vdb.definition setting in the
deploy.properties
-vdb.loc=${vdb.artifacts.dir}
+#vdb.loc=${vdb.artifacts.dir}
# turn off the configuration of the datastores (data refresh) and connector bindings
(setting the datastore connection info)
#disable_datastore=true
@@ -58,7 +58,7 @@
# this is the deploy.properties file which will be used to run all the tests
# it will have these properties updated:
# 1 - vdb.definition (which will be based on vdb.loc)
-deployprops.loc=${project.loc}/target/classes/ctc_tests/deploy.properties
+#deployprops.loc=${project.loc}/target/classes/ctc_tests/deploy.properties
process-batch = 20
connector-batch = 20
@@ -70,18 +70,18 @@
##########################################
# properties for Teiid connection
##########################################
+connection-type=driver
+#connection-type=datasource
-connection-type=datasource
-
#driver=org.teiid.jdbc.TeiidDataSource
### driver and url for connecting in server mode
-#driver=org.teiid.jdbc.TeiidDriver
-#URL=jdbc:metamatrix:${vdb}@mm://localhost:31000;user=admin;password=teiid
+Driver=org.teiid.jdbc.TeiidDriver
+URL=jdbc:metamatrix:${vdb.name}@mm://localhost:31000;user=admin;password=teiid
### driver and url for running in embedded mode
-driver=com.metamatrix.jdbc.EmbeddedDataSource
-URL=jdbc:metamatrix:${vdb.name}@target/classes/ctc_tests/deploy.properties;version=1;user=admin;password=teiid
+#driver=com.metamatrix.jdbc.EmbeddedDataSource
+#URL=jdbc:metamatrix:${vdb.name}@target/classes/ctc_tests/deploy.properties;version=1;user=admin;password=teiid
User=admin
Password=teiid
Modified: trunk/test-integration/db/src/main/resources/ctc_tests/ctc.xml
===================================================================
--- trunk/test-integration/db/src/main/resources/ctc_tests/ctc.xml 2010-04-09 17:39:12 UTC
(rev 2042)
+++ trunk/test-integration/db/src/main/resources/ctc_tests/ctc.xml 2010-04-09 19:29:27 UTC
(rev 2043)
@@ -10,6 +10,8 @@
<target name="main" depends="init, is.config.file,
set.default.config.file, set.config.file"
if="" unless="" description="create all property
files">
+ <echo>PROJECT DIRECTORY: ${proj_dir}</echo>
+
<antcall target="run.all.test" inheritall="true" />
<antcall target="run.single.test" inheritall="true" />
@@ -30,22 +32,12 @@
<available file="${queryset.artifacts.dir}" type="dir"
property="queryset.dir.exist"/>
<fail unless="queryset.dir.exist" message="QuerySet directory
${queryset.artifacts.dir} does not exist or was not specified." />
- <available file="${vdb.artifacts.dir}" type="dir"
property="vdb.dir.exist"/>
- <fail unless="vdb.dir.exist" message="VDB artifacts directory
${vdb.artifacts.dir} does not exist or was not specified." />
-
<condition property="single">
<available file="${scenario.dir}/${scenario.file}" />
</condition>
- <delete file="${ERROR_FILE}"/>
-
- <copy todir="${proj_dir}/lib" failonerror="false">
- <fileset dir="${third.party.jars.dir}"/>
- </copy>
-
-
+ <delete file="${ERROR_FILE}"/>
-
</target>
<target name="set.win"
@@ -57,13 +49,13 @@
<path location="${proj.dir}"/>
</pathconvert>
- <property name="root_output"
value="${proj_dir}/target/bulk-query-tests" />
+ <property name="root_output"
value="${proj_dir}/bulk-query-tests" />
</target>
<target name="set.linux"
if="UnixOS">
- <property name="root_output"
value="${proj.dir}/target/bulk-query-tests" />
+ <property name="root_output"
value="${proj.dir}/bulk-query-tests" />
<property name="proj_dir" value="${proj.dir}" />
</target>
@@ -82,7 +74,7 @@
<target name="set.default.config.file"
if="set.config.default">
- <property name="use.config.file"
value="${proj_dir}/src/main/resources/ctc_tests/ctc-test.properties" />
+ <property name="use.config.file"
value="${proj_dir}/resources/ctc_tests/ctc-test.properties" />
<echo>DEFAULT CONFIG: ${use.config.file}</echo>
</target>
@@ -164,10 +156,14 @@
<jvmarg value="-Dconfig=${use.config.file}" />
<jvmarg value="-Dscenariofile=${scenario_file}" />
<jvmarg value="-Dqueryset.artifacts.dir=${queryset_artifacts_dir}"
/>
- <jvmarg value="-Dvdb.artifacts.dir=${vdb_artifacts_dir}" />
<jvmarg
value="-Dquery.scenario.classname=${query.scenario.classname}" />
<jvmarg value="-Dusedatasources=${usedatasources}" />
<jvmarg value="-Ddatasourceloc=${datasourceloc}" />
+ <jvmarg value="-Dproj.dir=${proj_dir}" />
+
+ <!--
+ <jvmarg value="-Dvdb.artifacts.dir=${vdb_artifacts_dir}" />
+ -->
</java>
@@ -178,11 +174,14 @@
<echo>Scenario property file ${scenario.file}</echo>
<echo>Config property file ${use.config.file}</echo>
<echo>Query Artifacts ${queryset.artifacts.dir}</echo>
+ <echo>Classpath ${proj_dir}/lib</echo>
-
+<!--
+<pathelement path="${maven.runtime.classpath}" />
+-->
<java classname="org.teiid.test.client.TestClient"
fork="true" >
<classpath>
- <pathelement path="${maven.runtime.classpath}" />
+
<fileset dir="${proj_dir}/lib">
<include name="**/*.jar"/>
</fileset>
@@ -191,11 +190,15 @@
<jvmarg value="-Dconfig=${use.config.file}" />
<jvmarg value="-Dscenariofile=${scenario.file}" />
<jvmarg
value="-Dqueryset.artifacts.dir=${queryset.artifacts.dir}" />
- <jvmarg value="-Dvdb.artifacts.dir=${vdb.artifacts.dir}" />
<jvmarg
value="-Dquery.scenario.classname=${query.scenario.classname}" />
<jvmarg value="-Dusedatasources=${usedatasources}" />
- <jvmarg value="-Ddatasourceloc=${datasourceloc}" />
+ <jvmarg value="-Ddatasourceloc=${datasourceloc}" />
+ <jvmarg value="-Dproj.dir=${proj_dir}" />
+ <!--
+ <jvmarg value="-Dvdb.artifacts.dir=${vdb_artifacts_dir}" />
+ -->
+
</java>
<!--