| <?xml version="1.0"?> |
| <project name="org.eclipse.etrice.generator.common.tests"> |
| |
| <target name="testing" depends="copyModels"> |
| |
| <!-- add test here, testid==testSuiteFileName --> |
| <test testid="ActorCommunicationTest" models="${models.path}/ActorCommunicationTest.room ${models.path}/GenericPhysical.etphys ${models.path}/TimingService.room" /> |
| <test testid="ChoicePointTest" models="${models.path}/ChoicePointTest.room ${models.path}/GenericPhysical.etphys" /> |
| <test testid="ChoicePointTestExtended" models="${models.path}/ChoicePointTestExtended.room ${models.path}/GenericPhysical.etphys" /> |
| <test testid="DataDrivenTest" models="${models.path}/DataDrivenTest.room ${models.path}/GenericPhysical.etphys ${models.path}/TimingService.room" /> |
| <test testid="EnumTest" models="${models.path}/EnumTest.room ${models.path}/GenericPhysical.etphys" /> |
| <test testid="CompileTests" models="${models.path}/CompileTests.room ${models.path}/GenericPhysical.etphys ${models.path}/DetailExpressionTest.room ${models.path}/StatemachineInterfaceTest.room ${models.path}/StatemachineInterfaceInheritedTest.room ${models.path}/StatemachineInterfaceTest.room ${models.path}/ContinuationTransitionTest.room ${models.path}/TimingService.room" /> |
| <test testid="HandlerTest" models="${models.path}/HandlerTest.room ${models.path}/GenericPhysical.etphys" /> |
| <test testid="OperationInheritanceTest" models="${models.path}/OperationInheritanceTest.room ${models.path}/GenericPhysical.etphys" /> |
| <test testid="PingPongThreadTest" models="${models.path}/PingPongThreadTest.etmap ${models.path}/PingPongThreadTest.room ${models.path}/TimingService.room" /> |
| <test testid="PingPongThreadReplPortTest" models="${models.path}/PingPongThreadReplPortTest.etmap ${models.path}/PingPongThreadReplPortTest.room ${models.path}/TimingService.room" /> |
| |
| |
| <echo>done with ${ant.project.name}</echo> |
| </target> |
| |
| <target name="copyModels" depends="setVars"> |
| <copy todir="${models.path}"> |
| <fileset dir="../org.eclipse.etrice.generator.common.tests/models"/> |
| </copy> |
| <copy todir="${models.path}" > |
| <fileset dir="${modellib.path}/model"> |
| <include name="*.room"/> |
| <include name="*.etphys"/> |
| </fileset> |
| </copy> |
| </target> |
| |
| <!-- ################################################################ --> |
| |
| <!-- global properties --> |
| <!-- test.results, target.platform --> |
| |
| <!-- private properties--> |
| <property name="models.path" value="./models"/> |
| <property name="testlog.path" value="./log/testlog"/> |
| <property name="output" value="./output"/> |
| <property name="bin.path" value="./bin"/> |
| |
| <property name="run.msTimout" value="5000"/> |
| |
| <!-- show ALL used variables --> |
| <target name="showVars"> |
| <echo> ant.project.name = ${ant.project.name} </echo> |
| <echo> runtime.path = ${runtime.path} </echo> |
| <echo> testlog.path = ${testlog.path} </echo> |
| <echo> test.results = ${test.results} </echo> |
| <echo> output = ${output} </echo> |
| <echo> bin.path = ${bin.path} </echo> |
| <echo> target.platform = ${target.platform} </echo> |
| <echo> modellib.path = ${modellib.path} </echo> |
| <echo> models.path = ${models.path} </echo> |
| <echo> basedir = ${basedir} </echo> |
| |
| <echo> org.eclipse.emf.ecore = ${org.eclipse.emf.ecore} </echo> |
| <echo> org.eclipse.emf.common = ${org.eclipse.emf.common} </echo> |
| <echo> org.eclipse.emf.ecore.xmi = ${org.eclipse.emf.ecore.xmi} </echo> |
| <echo> com.google.inject = ${com.google.inject} </echo> |
| <echo> com.google.guava = ${com.google.guava} </echo> |
| <echo> org.eclipse.equinox.common = ${org.eclipse.equinox.common} </echo> |
| <echo> org.eclipse.xtext = ${org.eclipse.xtext} </echo> |
| <echo> org.eclipse.xtext.util = ${org.eclipse.xtext.util} </echo> |
| <echo> org.eclipse.xtext.common.types = ${org.eclipse.xtext.common.types} </echo> |
| <echo> org.eclipse.xtend.lib = ${org.eclipse.xtend.lib} </echo> |
| <echo> org.eclipse.xtext.xbase.lib = ${org.eclipse.xtext.xbase.lib} </echo> |
| <echo> org.apache.log4j = ${org.apache.log4j} </echo> |
| <echo> org.antlr.runtime = ${org.antlr.runtime} </echo> |
| <echo> javax.inject = ${javax.inject} </echo> |
| |
| <pathconvert property="classpathProp" refid="etrice.clspath"/> |
| <echo> etrice.clspath = ${classpathProp} </echo> |
| </target> |
| |
| <!-- set global properties if not set--> |
| <target name="set_local_tr" unless="test.results"> |
| <property name="test.results" value="./results"/> |
| </target> |
| <target name="set_local_tp" unless="target.platform"> |
| <property name="target.platform" value="${eclipse.home}"/> |
| </target> |
| |
| <target name="setVars" depends="set_local_tp,set_local_tr,set_etrice_clspath,showVars"/> |
| |
| <target name="set_etrice_clspath"> |
| <path id="etrice.clspath"> |
| <pathelement location="../../plugins/org.eclipse.etrice.generator.c/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.generator.java/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.generator.cpp/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.etunit.converter/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.generator.config/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.generator.doc/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.generator.fsm/bin" /> |
| <pathelement location="../../plugins/org.eclipse.etrice.generator/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.generator.gnuplot/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.core.common/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.core.fsm/bin" /> |
| <pathelement location="../../plugins/org.eclipse.etrice.core.room/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.core.etphys/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.core.etmap/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.core.config/bin"/> |
| <pathelement location="../../plugins/org.eclipse.etrice.core.genmodel.fsm/bin" /> |
| <pathelement location="../../plugins/org.eclipse.etrice.core.genmodel/bin"/> |
| |
| <!-- resolve dependencies using Oomph util in properties of launch config --> |
| <pathelement location="${org.eclipse.emf.ecore}"/> |
| <pathelement location="${org.eclipse.emf.common}"/> |
| <pathelement location="${org.eclipse.emf.ecore.xmi}"/> |
| <pathelement location="${com.google.inject}"/> |
| <pathelement location="${com.google.guava}"/> |
| <pathelement location="${org.eclipse.equinox.common}"/> |
| <pathelement location="${org.eclipse.xtext}"/> |
| <pathelement location="${org.eclipse.xtext.util}"/> |
| <pathelement location="${org.eclipse.xtext.common.types}"/> |
| <pathelement location="${org.eclipse.xtend.lib}"/> |
| <pathelement location="${org.eclipse.xtext.xbase.lib}"/> |
| <pathelement location="${org.apache.log4j}"/> |
| <pathelement location="${org.antlr.runtime}"/> |
| <pathelement location="${javax.inject}"/> |
| |
| <!-- resolve if used from Buckminster Ant task --> |
| <fileset dir="${target.platform}/plugins/"> |
| <include name="org.eclipse.emf.ecore_2.1*.jar" /> |
| <include name="org.eclipse.emf.common_2.1*.jar" /> |
| <include name="org.eclipse.emf.ecore.xmi_2.1*.jar" /> |
| <include name="com.google.inject_*.jar" /> |
| <include name="com.google.guava_1*.jar" /> |
| <include name="org.eclipse.equinox.common_3.*.jar" /> |
| <include name="org.apache.log4j_1.2*.jar" /> |
| <include name="org.antlr.runtime_3.2*.jar" /> |
| <include name="javax.inject_1.0*.jar" /> |
| |
| <!-- Xtext 2.6 --> |
| <include name="org.eclipse.xtext_2.6*.jar" /> |
| <include name="org.eclipse.xtext.util_2.6*.jar" /> |
| <include name="org.eclipse.xtext.common.types_2.6*.jar" /> |
| <include name="org.eclipse.xtend.lib_2.6*.jar" /> |
| <include name="org.eclipse.xtext.xbase.lib_2.6*.jar" /> |
| |
| <!-- Xtext 2.7 --> |
| <include name="org.eclipse.xtext_2.7*.jar" /> |
| <include name="org.eclipse.xtext.util_2.7*.jar" /> |
| <include name="org.eclipse.xtext.common.types_2.7*.jar" /> |
| <include name="org.eclipse.xtend.lib_2.7*.jar" /> |
| <include name="org.eclipse.xtext.xbase.lib_2.7*.jar" /> |
| |
| <!-- Xtext 2.8 --> |
| <include name="org.eclipse.xtext_2.8*.jar" /> |
| <include name="org.eclipse.xtext.util_2.8*.jar" /> |
| <include name="org.eclipse.xtext.common.types_2.8*.jar" /> |
| <include name="org.eclipse.xtend.lib_2.8*.jar" /> |
| <include name="org.eclipse.xtext.xbase.lib_2.8*.jar" /> |
| |
| <!-- Xtext 2.10 --> |
| <include name="org.eclipse.xtext_2.10*.jar" /> |
| <include name="org.eclipse.xtext.util_2.10*.jar" /> |
| <include name="org.eclipse.xtext.common.types_2.10*.jar" /> |
| <include name="org.eclipse.xtend.lib_2.10*.jar" /> |
| <include name="org.eclipse.xtext.xbase.lib_2.10*.jar" /> |
| </fileset> |
| </path> |
| </target> |
| |
| <!-- |
| clean: deletes all folders created by this script |
| --> |
| <target name="clean" depends="setVars"> |
| <delete dir="${testlog.path}"/> |
| <!--deletes resulst from other script on server <delete dir="${test.results}"/>--> |
| <delete dir="${output}"/> |
| <delete dir="${bin.path}"/> |
| <delete dir="${models.path}"/> |
| <delete dir="log"/> |
| <delete dir="src-gen"/> |
| </target> |
| |
| <macrodef name="convert"> |
| <attribute name="testId"/> |
| <sequential> |
| <java output="${output}/convert.txt" append="true" classname="org.eclipse.etrice.etunit.converter.EtUnitReportConverter" fork="true" failonerror="true"> |
| <arg value="-suite"/> |
| <arg value="${ant.project.name}.@{testId}"/> |
| <arg value="${testlog.path}/@{testId}.etu"/> |
| <classpath refid="etrice.clspath"/> |
| </java> |
| </sequential> |
| </macrodef> |
| |
| <macrodef name="convertPre"> |
| <attribute name="testId"/> |
| <sequential> |
| <java output="${output}/convert.txt" append="true" classname="org.eclipse.etrice.etunit.converter.EtUnitReportConverter" fork="true" failonerror="true"> |
| <arg value="-presuite"/> |
| <arg value="${ant.project.name}."/> |
| <arg value="${testlog.path}/@{testId}.etu"/> |
| <classpath refid="etrice.clspath"/> |
| </java> |
| </sequential> |
| </macrodef> |
| |
| <!-- |
| copy_results: copies the *.xml results to their final destination |
| --> |
| <macrodef name="copyResult"> |
| <attribute name="testId"/> |
| <attribute name="targetId" default=""/> |
| <sequential> |
| <mkdir dir="${test.results}"/> |
| <move file="${testlog.path}/@{testId}.xml" tofile="${test.results}/@{targetId}@{testId}.xml"/> |
| </sequential> |
| </macrodef> |
| |
| </project> |