Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a37d667b18bbbd003cc36866fd21f5c88f6f548e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0"?>
<!--
	Ant makefile for building and running of tests.
	This includes conversion of the etunit
	results into xunit xml.
	
	@author Henrik Rentz-Reichert
-->
<project name="org.eclipse.etrice.runtime.c.tests" basedir="." default="all">
	
	<import file="../org.eclipse.etrice.generator.common.tests/common.xml" as="common"/>
			
	<property name="runtime.path" value="../../runtime/org.eclipse.etrice.runtime.c" />
		
	<target name="set_local_rt" unless="runtime.platform">
		<!-- <property name="runtime.platform" value="MT_POSIX_GENERIC_GCC"/> -->
		<property name="runtime.platform" value="MT_WIN_MinGW"/>
		<echo>    runtime.platform = ${runtime.platform}        	</echo>
	</target>
	<target name="setVars" depends="set_local_rt,common.setVars"/>	
	
	<!--
		all: compiles, runs, converts and copies the results
	-->
	<target name="all" depends="convert,copy_results">
		<echo>done with ${ant.project.name}</echo>
	</target>
	
	<!--
		build: compiles and link everything
	-->
	<target name="build" depends="setVars,clean">
		<mkdir dir="${output}"/>
		<mkdir dir="${bin.path}"/>
		<exec executable="make" failonerror="true" output="${output}/build.txt">
			<arg line="all"/>
			<arg line="RUNTIME_ROOTDIR=${runtime.path}"/>
			<arg line="TARGET_PLATFORM=${runtime.platform}"/>
		</exec>
	</target>

	<!--
		run: runs all executables
	-->
	<target name="run" depends="build">
		<mkdir dir="${testlog.path}"/>
		<echo>start RuntimeTest</echo>
		<exec resolveexecutable="true" executable="${bin.path}/${ant.project.name}.exe" output="${output}/run.txt" />
		<echo>end   RuntimeTest</echo>
	</target>
	
	<!--
		convert: converts etu- into xunit xml-format
	-->
	<target name="convert" depends="run">
		<convertPre testId="TestEtUnitSpecial"/>
		<convertPre testId="TestCRuntime"/>
	</target>
	
	<!--
		copy_results: copies the *.xml results to their final destination
	-->
	<target name="copy_results" depends="setVars">
		<copyResult testId="TestEtUnitSpecial" targetid="${runtime.platform}_"/>
		<copyResult testId="TestCRuntime" targetid="${runtime.platform}_"/>
	</target>
	
</project>

Back to the top