| <?xml version="1.0" encoding="UTF-8" ?> |
| <!-- |
| Copyright (c) 2010 Cloudsmith Inc, Martin Taal (Doorn, The Netherlands) and others. |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License v1.0 |
| which accompanies this distribution, and is available at |
| http://www.eclipse.org/legal/epl-v10.html |
| |
| Contributors: |
| Cloudsmith Inc - build.xml for Buckminster project |
| Martin Taal - changes for Teneo |
| |
| Some important parts have been copied from Buckminster's own |
| build setup: |
| http://dev.eclipse.org/viewsvn/index.cgi/trunk/org.eclipse.buckminster.releng/build.xml?root=Tools_BUCKMINSTER&view=markup |
| --> |
| <project default="run" name="Teneo Tests"> |
| |
| <!-- |
| Inherited properties: |
| buildRoot: the root of this build |
| toolsPath: path containing buckminster |
| buildSitePath: the path to which the p2 site should be copied |
| buildZipsPath: the path to the directory with zip files |
| |
| buckminster.output.root |
| buckminster.temp.root |
| --> |
| |
| <property name="testRoot" location="${rootPath}/test" /> |
| |
| <property name="targetPlatformPath" location="${testRoot}/tp" /> |
| <property name="workspacePath" location="${testRoot}/workspace" /> |
| |
| <import file="../ant_common.xml" /> |
| |
| <target name="run" depends="init.build.properties"> |
| |
| <mkdir dir="${targetPlatformPath}" /> |
| <mkdir dir="${workspacePath}" /> |
| |
| <echo message="Setting jre to ${env.JAVA_HOME}"/> |
| <buckminster command="installJRE" workspace="${workspacePath}"> |
| <cmdargs> |
| <arg value="--location" /> |
| <arg value="${env.JAVA_HOME}" /> |
| </cmdargs> |
| </buckminster> |
| |
| <echo message="Using workspace ${workspacePath}" /> |
| <echo message="Setting targetPlatformPath to ${targetPlatformPath}" /> |
| <buckminster command="setpref" workspace="${workspacePath}"> |
| <cmdargs> |
| <arg value="targetPlatformPath=${targetPlatformPath}" /> |
| </cmdargs> |
| </buckminster> |
| |
| <echo message="Importing projects into workspace ${workspacePath}" /> |
| <echo message="Importing binaries into target platform ${targetPlatformPath}" /> |
| <buckminster command="import" workspace="${workspacePath}"> |
| <cmdargs> |
| <arg value="${basedir}/teneo.mspec" /> |
| </cmdargs> |
| </buckminster> |
| |
| <echo message="Building" /> |
| <buckminster command="build" workspace="${workspacePath}"> |
| <cmdargs> |
| <arg value="--thorough" /> |
| </cmdargs> |
| </buckminster> |
| |
| <echo message="Running tests Hibernate" /> |
| <buckminster command="emma" workspace="${workspacePath}"> |
| <cmdargs> |
| <arg value="-l" /> |
| <arg value="org.eclipse.emf.teneo.hibernate.test/AllTests.launch" /> |
| <arg value="-o" /> |
| <arg value="${testResultsPath}/output/test-results-hibernate.xml" /> |
| <arg value="--stdout" /> |
| <arg value="${testResultsPath}/output/stdout.txt" /> |
| <arg value="--stderr" /> |
| <arg value="${testResultsPath}/output/stderr.txt" /> |
| <arg value="--xml" /> |
| <arg value="${testResultsPath}/output/hibernate-coverageReport.xml" /> |
| <arg value="--flatXML"/> |
| </cmdargs> |
| </buckminster> |
| |
| <!-- convert the xml to a format which can be read by junit report> |
| NOTE: not used anymore, the flatXML argument now takes care of this |
| <xslt in="${testResultsPath}/output/test-results-hibernate.xml" out="${testResultsPath}/xml/TESTS-hibernate.xml" style="convert-test-results.xsl"> |
| <param name="timeStamp" expression="${buildTimeStamp}" /> |
| <param name="testName" expression="Hibernate Tests" /> |
| <param name="testPackage" expression="org.eclipse.emf.teneo.hibernate.tests" /> |
| </xslt--> |
| |
| <echo message="Running tests EclipseLink" /> |
| <buckminster command="junit" workspace="${workspacePath}"> |
| <cmdargs> |
| <arg value="-l" /> |
| <arg value="org.eclipse.emf.teneo.eclipselink.examples.library.orm.tests/AllTests.launch" /> |
| <arg value="-o" /> |
| <arg value="${testResultsPath}/output/test-results-eclipselink.xml" /> |
| <arg value="--stdout" /> |
| <arg value="${testResultsPath}/output/stdout.txt" /> |
| <arg value="--stderr" /> |
| <arg value="${testResultsPath}/output/stderr.txt" /> |
| <arg value="--flatXML"/> |
| </cmdargs> |
| </buckminster> |
| |
| <!-- convert the xml to a format which can be read by junit report> |
| NOTE: not used anymore, the flatXML argument now takes care of this |
| <xslt in="${testResultsPath}/output/test-results-eclipselink.xml" out="${testResultsPath}/xml/TESTS-eclipselink.xml" style="convert-test-results.xsl"> |
| <param name="timeStamp" expression="${buildTimeStamp}" /> |
| <param name="testName" expression="EclipseLink Tests" /> |
| <param name="testPackage" expression="org.eclipse.emf.teneo.eclipselink.tests" /> |
| </xslt--> |
| </target> |
| |
| <target name="init.build.properties"> |
| <!-- Echo relevant properties to a temporary file so that Buckminster can read them |
| --> |
| <tempfile destdir="${java.io.tmpdir}" prefix="build-" suffix=".properties" deleteonexit="true" property="properties.tmp" /> |
| <echoproperties destfile="${properties.tmp}"> |
| <!-- We don't want these. basedir in particular will cause problems if passed explicitly --> |
| <propertyset negate="true"> |
| <propertyref name="basedir" /> |
| <propertyref name="eclipse.home" /> |
| <propertyref name="properties.tmp" /> |
| <propertyref name="line.separator" /> |
| <propertyref name="path.separator" /> |
| <propertyref prefix="ant." /> |
| <propertyref prefix="file." /> |
| <propertyref prefix="java." /> |
| <propertyref prefix="sun." /> |
| <propertyref prefix="user." /> |
| </propertyset> |
| </echoproperties> |
| </target> |
| |
| </project> |