1 <?xml version="1.0" encoding="UTF-8"?>
3 <project name="dol" default="all" basedir=".">
6 Ant build file to run tests.
9 <!-- directory paths -->
10 <property name="lib.dir" location="./../../../jars"/>
11 <property name="bin.dir" location="./../../../bin"/>
12 <property name="jars" value=".:./..:${lib.dir}/dol.jar:${lib.dir}/xercesImpl.jar:${lib.dir}/jdom.jar:${bin.dir}/dol.jar:${bin.dir}/xercesImpl.jar:${bin.dir}/jdom.jar"/>
13 <property name="example.dir" location="./../../../examples"/>
14 <property name="test.dir" location="./../../../test"/>
16 <property name="generator" value="HdS"/> <!-- HdS, protothread, systemC, PaF -->
18 <target name="all" depends="xml, checkexamples"/>
20 <!-- check validity of XML documents -->
22 <echo message="Check XML documents."/>
23 <java classname="test.test.TreeValidator"
27 <classpath path="${jars}"/>
28 <arg line="${example.dir}/schema
29 ${example.dir}/exampleproducerconsumer
30 ${example.dir}/example1
31 ${example.dir}/example2
32 ${example.dir}/example3
33 ${example.dir}/example4
34 ${example.dir}/example5
35 ${example.dir}/example6
36 ${example.dir}/example7
37 ${example.dir}/examplesingleprocess
38 ${example.dir}/arch"/>
42 <!-- compile and run examples and check agains reference output -->
43 <macrodef name="runandcheck">
44 <attribute name="number"/>
46 <ant antfile="runexample.xml"
49 <property name="number" value="@{number}"/>
50 <property name="generator" value="${generator}"/>
53 <copy file="example@{number}/${generator}/src/log.txt"
54 tofile="test/example@{number}log.txt"
58 <copy file="${test.dir}/reference/example@{number}_${os.name}.txt"
59 tofile="test/example@{number}ref.txt"
63 <java classname="test.util.Diff"
67 <classpath path="${jars}"/>
68 <arg line="test/example@{number}ref.txt test/example@{number}log.txt "/>
71 <java classname="dol.main.Main"
76 <arg line=" -T profile.txt -P example@{number}/example@{number}_flattened.xml -G example@{number}/example@{number}_flattened_annotated.xml"/>
79 <echo message="Successfully tested example @{number}."/>
83 <!-- check all examples -->
84 <target name="checkexamples">
85 <echo message="Check examples."/>
87 <runandcheck number="1"/>
88 <runandcheck number="2"/>
89 <runandcheck number="4"/>
90 <runandcheck number="6"/>
91 <runandcheck number="7"/>
92 <runandcheck number="singleprocess"/>
93 <runandcheck number="3"/>