gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
ant - recording logs of testing, plus prev test
[mjc2wsl.git] / build.xml
index 421377f..3712f02 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -14,6 +14,9 @@
     <property name="java.encoding" value="utf-8" />
     <taskdef resource="net/sf/antcontrib/antlib.xml"/>
     
+    <!-- when using multiple threads there is a problem with logging!-->
+    <property name="global.max.threads" value="1" />
+    
     <property name="mjc2wsl.class.dir" value="bin" />
     <property name="mjc2wsl.src.dir" value="src" />
     <property name="mjc2wsl.options" value="" />
@@ -39,6 +42,7 @@
     <property name="log.dir" value="logs" />
     <property name="log.file.transformations" value="${log.dir}/transformations" />
     <property name="log.file.mjc2wsl" value="${log.dir}/mjc2wsl" />
+    <property name="log.file.tests.m" value="${log.dir}/tests-mj" />
 
     <description>
         Builder script for mjc2wsl and related tools, runs test
     <target name="mjc2wsl-samples" depends="build,init-time" description="run the mjc2wsl tool on the samples">
         <record name="${log.file.mjc2wsl}${time}.txt" emacsmode="true" />
         <echo>Used options:${mjc2wsl.options}</echo>
-        <foreach param="filename" target="mjc2wsl">
+        <foreach param="filename" target="mjc2wsl"  parallel="true" maxthreads="${global.max.threads}">
             <path>
             <fileset dir='${samples.temp.dir}'>
                 <include name="*.obj"/>
     </target>
     
     <target name="mj-samples" description="run the mj compiler on the samples" depends="init">
-        <foreach param="filename" target="mj-compile">
+        <foreach param="filename" target="mj-compile"  parallel="true" maxthreads="${global.max.threads}">
             <path>
             <fileset dir='${samples.temp.dir}'>
                 <include name="*.mj"/>
     <target name="wsl-transf-samples" depends="init"
     description="transform (simplify) the wsl files generated by mjc2wsl" >
         <record name="${log.file.transformations}${time}.txt" emacsmode="true" />
-        <foreach param="transf.filename" target="wsl-transf">
+        <foreach param="transf.filename" target="wsl-transf" parallel="true" maxthreads="${global.max.threads}">
             <path>
             <fileset dir='${samples.temp.dir}'>
                 <patternset refid="non.transformed.sources"/>
         </foreach>
     </target>
     
-    <target name="test-all-m" depends="init-compare"
+    <target name="test-all-m" depends="init-compare,init-time"
     description="Run all the tests from the test directory to compare MJ and WSL" >
+        <record name="${log.file.tests.m}${time}.txt" emacsmode="true" />
         <foreach param="filename" target="test-fn" inheritall="true">
             <path>
             <fileset dir='${samples.temp.dir}'>
             </fileset>
             </path>
         </foreach>
+        <record name="${log.file.tests}${time}.txt" action="stop" />
+        <move file="${log.file.tests.m}.txt" tofile="${log.file.tests.m}-previous.txt" failonerror="false"/>
+        <copy file="${log.file.tests.m}${time}.txt" tofile="${log.file.tests.m}.txt"/>        
     </target>
 
     <target name="test-all-t" depends="init-compare"
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner