Commit | Line | Data |
---|---|---|
03c71d1e ASL |
1 | <?xml version="1.0"?> |
2 | ||
3 | <project name="testsuite" default="run" basedir="."> | |
38960eca | 4 | <property name="classname" value="org.eclipse.linuxtools.lttng.core.tests" /> |
03c71d1e ASL |
5 | <property name="lttng-event-test-suite-classname" value="org.eclipse.linuxtools.lttng.tests.event.AllLttngTests" /> |
6 | <property name="lttng-jni-test-suite-classname" value="org.eclipse.linuxtools.lttng.tests.jni.AllJniTests" /> | |
7 | <property name="plugin-name" value="org.eclipse.linuxtools.lttng.tests" /> | |
8 | ||
9 | <!-- The property ${eclipse-home} should be passed into this script --> | |
10 | <!-- Set a meaningful default value for when it is not. --> | |
11 | <property name="eclipse-home" value="${basedir}/../../" /> | |
12 | ||
13 | <property name="library-file" value="${eclipse-home}/dropins/${subProjectName2}/plugins/org.eclipse.test/library.xml" /> | |
14 | ||
15 | <!-- This target holds all initialization code that needs to be done for --> | |
16 | <!-- all tests that are to be run. Initialization for individual tests --> | |
17 | <!-- should be done within the body of the suite target. --> | |
18 | <target name="init"> | |
19 | <tstamp /> | |
20 | <delete> | |
21 | <fileset dir="${eclipse-home}" includes="org*.xml" /> | |
22 | </delete> | |
23 | </target> | |
24 | ||
25 | <!-- This target defines the tests that need to be run. --> | |
26 | <target name="lttng_event_test_suite"> | |
27 | <property name="lttng-folder" value="${eclipse-home}/lttng_folder" /> | |
28 | <delete dir="${lttng-folder}" quiet="true" /> | |
29 | <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}"> | |
30 | <property name="data-dir" value="${lttng-folder}" /> | |
31 | <property name="plugin-name" value="${plugin-name}" /> | |
32 | <property name="classname" value="${lttng-event-test-suite-classname}" /> | |
33 | </ant> | |
34 | </target> | |
35 | ||
36 | <target name="lttng_jni_test_suite"> | |
37 | <property name="lttng-folder" value="${eclipse-home}/lttng_folder" /> | |
38 | <delete dir="${lttng-folder}" quiet="true" /> | |
39 | <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}"> | |
40 | <property name="data-dir" value="${lttng-folder}" /> | |
41 | <property name="plugin-name" value="${plugin-name}" /> | |
42 | <property name="classname" value="${lttng-jni-test-suite-classname}" /> | |
43 | </ant> | |
44 | </target> | |
45 | ||
46 | <!-- This target holds code to cleanup the testing environment after --> | |
47 | <!-- all of the tests have been run. You can use this target to --> | |
48 | <!-- delete temporary files that have been created. --> | |
49 | <target name="cleanup"> | |
50 | <mkdir dir="${results}/consolelogs" /> | |
51 | <copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" /> | |
52 | </target> | |
53 | ||
54 | <!-- This target runs the test suite. Any actions that need to happen --> | |
55 | <!-- after all the tests have been run should go here. --> | |
e1ab8984 | 56 | <target name="run" depends="init,lttng_event_test_suite,cleanup"> |
03c71d1e ASL |
57 | <ant target="collect" antfile="${library-file}" dir="${eclipse-home}"> |
58 | <property name="includes" value="org*.xml" /> | |
59 | <property name="output-file" value="${plugin-name}.xml" /> | |
60 | </ant> | |
61 | </target> | |
62 | ||
63 | <target name="all" depends="run" description="Dummy target to run all tests"> | |
64 | </target> | |
65 | ||
66 | </project> |