19 Description: |
19 Description: |
20 |
20 |
21 ============================================================================ |
21 ============================================================================ |
22 --> |
22 --> |
23 <project name="run-scenario" xmlns:ac="antlib:net.sf.antcontrib" xmlns:au="antlib:org.apache.ant.antunit"> |
23 <project name="run-scenario" xmlns:ac="antlib:net.sf.antcontrib" xmlns:au="antlib:org.apache.ant.antunit"> |
24 <description>Helium Antlib logger macro.</description> |
24 <description>Helium Antlib logger macro.</description> |
25 |
25 |
26 <target name="setUp"> |
26 <target name="setUp"> |
27 <tempfile property="temp.dir" suffix=".dir" /> |
27 <tempfile property="temp.dir" suffix=".dir" /> |
28 <mkdir dir="${temp.dir}" /> |
28 <mkdir dir="${temp.dir}" /> |
29 <echo>--------------------------------------------</echo> |
29 <echo>--------------------------------------------</echo> |
30 </target> |
30 </target> |
31 |
31 |
32 <target name="tearDown"> |
32 <target name="tearDown"> |
33 <echo>--------------------------------------------</echo> |
33 <echo>--------------------------------------------</echo> |
34 <delete dir="${temp.dir}" /> |
34 <delete dir="${temp.dir}" /> |
35 </target> |
35 </target> |
36 |
36 |
37 <macrodef name="runScenario"> |
37 <macrodef name="runScenario"> |
38 <attribute name="scenario" /> |
38 <attribute name="scenario" /> |
39 <attribute name="target" /> |
39 <attribute name="target" /> |
40 <sequential> |
40 <sequential> |
41 <exec osfamily="windows" executable="cmd" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true"> |
41 <exec osfamily="windows" executable="cmd" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true"> |
42 <env key="ANT_ARGS" value="${env.ANT_ARGS} -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener" /> |
42 <env key="ANT_ARGS" value="${env.ANT_ARGS} -listener com.nokia.helium.logger.ant.listener.CommonListener" /> |
43 <arg line="/c ..\build.bat @{target}" /> |
43 <arg line="/c ..\build.bat @{target}" /> |
44 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" /> |
44 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" /> |
45 <arg value="-Dtemp.dir=${temp.dir}" /> |
45 <arg value="-Dtemp.dir=${temp.dir}" /> |
46 </exec> |
46 </exec> |
47 <exec osfamily="unix" executable="../bld.sh" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true"> |
47 <exec osfamily="unix" executable="../bld.sh" dir="${ant.file.run-scenario}/../../scenarii/@{scenario}" failonerror="true"> |
48 <env key="ANT_ARGS" value="${env.ANT_ARGS} -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener" /> |
48 <env key="ANT_ARGS" value="${env.ANT_ARGS} -listener com.nokia.helium.logger.ant.listener.CommonListener" /> |
49 <arg line="@{target}" /> |
49 <arg line="@{target}" /> |
50 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" /> |
50 <arg value="-Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor" /> |
51 <arg value="-Dtemp.dir=${temp.dir}" /> |
51 <arg value="-Dtemp.dir=${temp.dir}" /> |
52 </exec> |
52 </exec> |
53 </sequential> |
53 </sequential> |
54 </macrodef> |
54 </macrodef> |
55 |
55 |
56 </project> |
56 </project> |