blob: a616698d1041c2a769e4699e5e29d89f0ca108ba [file] [log] [blame]
<project
name="SimRel Tests"
basedir="."
default="runTests">
<property environment="env" />
<!-- This property file name is itself a property, so it can be overridden
on one machine versus another. We do it this way, instead of just specifying
-propertyFile on command line, so that the property values can be "nested"
in other property values and evaluated lazily. -->
<property
name="aggrPropertyFile"
value="aggr.properties" />
<loadproperties srcfile="${aggrPropertyFile}" />
<!-- We'll put test output files right in "the p2 repository". Though, later
we will want to "save old reports", without saving the entire repository.
.../reporeports/reports contains the actual reports.
.../reporeports contains the index.html file.
-->
<property
name="reportOutputDir"
value="${testRepoDirectory}/buildInfo" />
<!-- buildInfo should already exist, and contain "properties" of build -->
<mkdir dir="${reportOutputDir}" />
<!--
<property
name="reportRepoDir"
value="${stagingDirectory}" />
-->
<property
name="referenceRepoDir"
value="${REPO_ROOT}/releases/mars/201602261000/" />
<property
name="eclipseTestExecutable"
value="${ECLIPSE_TEST_EXE}" />
<!--
Each "type" of build, ends by calling one of these targets.
So far, only the "clean build" has any real tests, be eventually others
could have some checks/tests.
-->
<target name="validateOnlyTests">
<echo message="No validation-only tests, yet" />
<echoproperties />
</target>
<target name="cachedBuildTests">
<echo message="No cached build tests, yet" />
<echoproperties />
</target>
<target
name="cleanBuildTests"
depends="runTests">
<echo>
Ran standard clean build reports and tests.
See report in ${reportOutputDir}.
</echo>
</target>
<target name="runTests">
<echo message="Creating Reports" />
<echoproperties />
<antcall target="runReports" />
<!-- currently, we never "fail" ... but, will in future -->
<fail if="failuresoccurred" />
</target>
<target name="runReports">
<property
name="REPORT_APP_NAME"
value="org.eclipse.cbi.p2repo.analyzers.repoReport" />
<property
name="VM_TEST_ARGS"
value="-Djava.io.tmpdir=${BUILD_HOME}/tmp -DreportOutputDir=${reportOutputDir} -DreportRepoDir=${testRepoDirectory} -DreferenceRepo=${referenceRepoDir}" />
<!-- eclipseTestExecutable and JAVA_EXEC_DIR is set in aggr.properties, since specific to every machine -->
<echo message="in runReports: eclipseTestExecutable: ${eclipseTestExecutable}" />
<echo message="in runReports: REPORT_APP_NAME: ${REPORT_APP_NAME}" />
<echo message="in runReports: JAVA_EXEC_DIR: ${JAVA_EXEC_DIR}" />
<echo message="in runReports: VM_TEST_ARGS: ${VM_TEST_ARGS}" />
<echo message="in runReports: reportOutputDir: ${reportOutputDir}" />
<echo message="in runReports: testRepoDirectory: ${testRepoDirectory}" />
<echo message="in runReports: referenceRepoDir: ${referenceRepoDir}" />
<echo message="in runReports: basedir: ${basedir}" />
<exec
executable="${eclipseTestExecutable}"
dir="${basedir}"
failonerror="true">
<arg value="-nosplash" />
<arg value="-debug" />
<arg value="--launcher.suppressErrors" />
<arg value="-application" />
<arg value="${REPORT_APP_NAME}" />
<arg value="-vm" />
<arg value="${JAVA_EXEC_DIR}" />
<arg value="-vmargs" />
<arg line="${VM_TEST_ARGS}" />
</exec>
</target>
</project>