You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by dw...@apache.org on 2010/01/04 22:10:09 UTC
svn commit: r895783 - /openjpa/trunk/openjpa-integration/tck/pom.xml
Author: dwoods
Date: Mon Jan 4 21:10:09 2010
New Revision: 895783
URL: http://svn.apache.org/viewvc?rev=895783&view=rev
Log:
OPENJPA-1453 Updates to add javaagent and pass/fail counts for JPA2 runs
Modified:
openjpa/trunk/openjpa-integration/tck/pom.xml
Modified: openjpa/trunk/openjpa-integration/tck/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/tck/pom.xml?rev=895783&r1=895782&r2=895783&view=diff
==============================================================================
--- openjpa/trunk/openjpa-integration/tck/pom.xml (original)
+++ openjpa/trunk/openjpa-integration/tck/pom.xml Mon Jan 4 21:10:09 2010
@@ -81,13 +81,32 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
+ <artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
- <id>run-tck</id>
- <phase>integration-test</phase>
+ <phase>validate</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
<configuration>
- <tasks>
+ <rules>
+ <requireJavaVersion>
+ <version>[1.6,)</version>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-tck</id>
+ <phase>integration-test</phase>
+ <configuration>
+ <tasks>
<echo>Running Sun JPA 2.0 TCK</echo>
<property name="tck.zip" value="${settings.localRepository}/../privaterepos/jpatck-2.0_09-Dec-2009.zip" />
@@ -127,6 +146,7 @@
<property name="jpatck.pkg.dir" value="com" />
<property name="jpatck.test" value="" />
+ <property name="jpatck.reports.dir" value="${tck.dir}/../reports" />
<property name="jpatck.work.dir" value="${tck.dir}/../work" />
<property name="tck.log" value="${tck.base}/openjpa-tck.log" />
@@ -159,7 +179,7 @@
jpa.home=${tck.dir}
work.dir=${jpatck.work.dir}
-report.dir=${tck.dir}/../reports
+report.dir=${jpatck.reports.dir}
jpa.classes=${cp.property}
database.classes=${jpa.classes}
# Need to specify java.* classes, both in Windows/UNIX locations as well as Mac.
@@ -197,14 +217,13 @@
<echo>AGENT: ${agent}${agent.properties}</echo>
<!--
- Replace the existing javaagent argument (which
- uses Toplink's enhancer) with our own. Also, we
- need to specify the default MetaDataFactory in
- order to allow tests that don't have any
+ Add in a javaagent argument (optional in JPA2 TCK.)
+ Also, we need to specify the default MetaDataFactory
+ inorder to allow tests that don't have any
persistent classes to work (like the SignatureTest)
-->
<replace file="${jpatck.config}">
- <replacefilter token="-javaagent:${jpa.home}/lib/toplink-essentials-agent.jar" value="-javaagent:${agent}${agent.properties} -Dopenjpa.MetaDataFactory=jpa(DefaultAccessType=PROPERTY)" />
+ <replacefilter token="${JAVA_HOME}/bin/java" value="${JAVA_HOME}/bin/java -javaagent:${agent}${agent.properties} -Dopenjpa.MetaDataFactory=jpa(DefaultAccessType=PROPERTY)" />
</replace>
<!-- make a macro for the TCK harness launcher -->
@@ -251,6 +270,41 @@
<!-- now run the TCK -->
<tsant buildfile="${tck.dir}/bin/build.xml" target="runclient" />
+ <!-- archive the results -->
+ <property name="tck.results.archive" value="${tck.base}/openjpa-tck-results.zip" />
+ <zip destfile="${tck.results.archive}">
+ <fileset dir="${jpatck.work.dir}" />
+ <fileset dir="${jpatck.reports.dir}" />
+ </zip>
+ <echo>Results archive at: ${tck.results.archive}</echo>
+
+ <!-- Figure out the Passed/Failed counts -->
+ <resourcecount property="count.passed">
+ <tokens>
+ <concat>
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="Passed."/>
+ </tokenfilter>
+ </filterchain>
+ <fileset dir="${jpatck.reports.dir}" includes="summary.txt" />
+ </concat>
+ </tokens>
+ </resourcecount>
+ <resourcecount property="count.failed">
+ <tokens>
+ <concat>
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="Failed."/>
+ </tokenfilter>
+ </filterchain>
+ <fileset dir="${jpatck.reports.dir}" includes="summary.txt" />
+ </concat>
+ </tokens>
+ </resourcecount>
+ <echo>TCK Results - Passed: ${count.passed}, Failed: ${count.failed}</echo>
+
<!--
The TCK's Java process doesn't actually fail when
tests fail, so we need to parse the results file
@@ -260,21 +314,17 @@
<condition property="jpatck.failed">
<contains string="${jpatck.results}" substring="Completed test run: not ok" />
</condition>
- <fail if="jpatck.failed">Some tests failed</fail>
-
- <echo>JPA TCK Passed 100%!</echo>
-
- <property name="tck.results.archive" value="${tck.base}/openjpa-tck-results.zip" />
- <zip destfile="${tck.results.archive}" basedir="${jpatck.work.dir}" />
- <echo>Results archive at: ${tck.results.archive}</echo>
-
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
+ <fail if="jpatck.failed">${count.failed} tests failed</fail>
+ <!-- else -->
+ <echo>Passed JPA 2.0 TCK!</echo>
+
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
@@ -295,13 +345,32 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
+ <artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
- <id>run-tck</id>
- <phase>integration-test</phase>
+ <phase>validate</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
<configuration>
- <tasks>
+ <rules>
+ <requireJavaVersion>
+ <version>[1.5,)</version>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>run-tck</id>
+ <phase>integration-test</phase>
+ <configuration>
+ <tasks>
<echo>Running Sun JPA TCK</echo>
<property name="tck.zip" value="${settings.localRepository}/../privaterepos/jpa-1_0b-tck.zip" />
@@ -466,6 +535,11 @@
<!-- now run the TCK -->
<tsant buildfile="${tck.dir}/bin/build.xml" target="runclient" />
+ <!-- archive the results -->
+ <property name="tck.results.archive" value="${tck.base}/openjpa-tck-results.zip" />
+ <zip destfile="${tck.results.archive}" basedir="${jpatck.work.dir}" />
+ <echo>Results archive at: ${tck.results.archive}</echo>
+
<!--
The TCK's Java process doesn't actually fail when
tests fail, so we need to parse the results file
@@ -476,20 +550,16 @@
<contains string="${jpatck.results}" substring="Completed test run: not ok" />
</condition>
<fail if="jpatck.failed">Some tests failed</fail>
-
+ <!-- else -->
<echo>JPA TCK Passed 100%!</echo>
- <property name="tck.results.archive" value="${tck.base}/openjpa-tck-results.zip" />
- <zip destfile="${tck.results.archive}" basedir="${jpatck.work.dir}" />
- <echo>Results archive at: ${tck.results.archive}</echo>
-
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>