gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
ant - test tasks - can be run at once on the obj, wsl and transformed files
authorDoni Pracner <quinnuendo@gmail.com>
Thu, 2 Jan 2014 20:47:07 +0000 (21:47 +0100)
committerDoni Pracner <quinnuendo@gmail.com>
Thu, 2 Jan 2014 20:47:07 +0000 (21:47 +0100)
build.xml

index 419f536384ccc88d21eb73fd2a79ac803a313188..fac261a021b712478ffe461289d76d966159c258 100644 (file)
--- a/build.xml
+++ b/build.xml
         <javac srcdir="${compiler.src.dir}" destdir="${compiler.class.dir}" includeAntRuntime='no' />
     </target>
     
-    <target name="mj-compile">
+    <target name="mj-compile" description="compile a MJ into obj file; given ${filename}">
         <echo message="${filename}" />
         <java classpath="${compiler.class.dir}" classname="Compiler">
             <arg value="${filename}" />
         </foreach>
     </target>
 
-    <target name="mj-run">
+    <target name="mj-run" description="run a MJ obj file given in ${filename} with ${inputstring}">
         <echo message="${filename}" />
-        <java classpath="${compiler.class.dir}" classname="Run">
+        <java classpath="${compiler.class.dir}" classname="Run" inputstring="${inputstring}">
             <arg value="${filename}" />
         </java>
     </target>
         <echo file="${transf.wsl.ini}">${generated-wsl-files}</echo>
     </target>
     
+    <!-- Testing tasks -->
+    
+    <target name="test-run" 
+    description="run .obj .wsl _t.wsl, given are ${file.dir}, ${file.name} (no extension) and an ${inputstring}">
+        <antcall target="mj-run">
+            <param name="filename" value="${file.dir}/${file.name}.obj" />
+            <param name="inputstring" value="${inputstring}" />
+        </antcall>
+        <antcall target="wsl-run">
+            <param name="filename" value="${file.dir}/${file.name}.wsl" />
+            <param name="inputstring" value="${inputstring}" />
+        </antcall>
+        <antcall target="wsl-run">
+            <param name="filename" value="${file.dir}/${file.name}_t.wsl" />
+            <param name="inputstring" value="${inputstring}" />
+        </antcall>
+    </target>
+    
+    <target name="test-run-samples-dir"
+    description="run .obj .wsl _t.wsl, in the samples-temp directory; given ${file.name} (no extension) and an ${inputstring}">
+        <antcall target="test-run">
+            <param name="file.dir" value="${samples.temp.dir}"/>
+        </antcall>
+    </target>
+    
     <!-- jedit specific flags; needs to be the first or the last 10 lines
     :noTabs=true:
     -->
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner