changeset 14061:04b3b59f601e

Add ANT file for running tests
author briangoetz
date Sat, 11 Jun 2016 19:59:11 -0400
parents 6bfe9ce6659d
children 546310bd4ee5
files interpreter/.idea/ant.xml interpreter/build.xml
diffstat 2 files changed, 88 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/interpreter/.idea/ant.xml	Sat Jun 11 19:59:11 2016 -0400
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="AntConfiguration">
+    <buildFile url="file://$PROJECT_DIR$/build.xml" />
+  </component>
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/interpreter/build.xml	Sat Jun 11 19:59:11 2016 -0400
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<project name="interpreter" default="dist" basedir=".">
+
+    <property name="common" value="test-common"/>
+    <property name="helpers" value="test-helpers"/>
+
+    <property name="build.dir" value="out"/>
+    <property name="interpreter.src" value="src"/>
+    <property name="interpreter.jar" value="interpreter.jar"/>
+    <property name="common.src" value="${common}/src"/>
+    <property name="interpreter.test" value="test"/>
+    <property name="helpers.test" value="${helpers}/test"/>
+    <property name="interpreter.classes" value="${build.dir}/production/interpreter"/>
+    <property name="common.classes" value="${build.dir}/production/test-common"/>
+    <property name="interpreter.test.classes" value="${build.dir}/test/interpreter"/>
+    <property name="helpers.test.classes" value="${build.dir}/test/test-helpers"/>
+    <property name="dist" value="dist"/>
+    <property name="testng.jar" value="testng-6.9.10.jar" />
+    <property name="jcommander.jar" value="jcommander-1.48.jar" />
+    <property name="tools.jar" value="${java.home}/../lib/tools.jar" />
+
+    <taskdef resource="testngtasks" classpath="${testng.jar}"/>
+
+    <path id="test.compile.path">
+        <pathelement path="${interpreter.classes}" />
+        <pathelement path="${common.classes}" />
+        <pathelement path="${testng.jar}" />
+        <pathelement path="${jcommander.jar}" />
+    </path>
+
+    <path id="test.class.path">
+        <path refid="test.compile.path"/>
+        <pathelement path="${interpreter.test.classes}"/>
+        <pathelement path="${helpers.test.classes}"/>
+        <pathelement path="${tools.jar}"/>
+    </path>
+
+    <target name="prepare">
+        <mkdir dir="${interpreter.classes}"/>
+        <mkdir dir="${interpreter.test.classes}"/>
+        <mkdir dir="${common.classes}"/>
+        <mkdir dir="${helpers.test.classes}"/>
+    </target>
+
+    <target name="clean">
+        <delete dir="${build.dir}"/>
+        <delete dir="${interpreter.jar}"/>
+    </target>
+
+    <target name="compile" depends="prepare">
+        <javac srcdir="${interpreter.src}" destdir="${interpreter.classes}">
+            <compilerarg value="-XDignore.symbol.file"
+            />
+        </javac>
+
+        <javac srcdir="${common.src}" destdir="${common.classes}"/>
+    </target>
+
+    <target name="compile-test" depends="prepare, compile">
+        <javac srcdir="${interpreter.test}" destdir="${interpreter.test.classes}"
+               classpathref="test.compile.path"
+               includeantruntime="false" >
+            <compilerarg value="-XDignore.symbol.file" />
+        </javac>
+
+        <javac srcdir="${helpers.test}" destdir="${helpers.test.classes}"
+               classpathref="test.compile.path" />
+    </target>
+
+    <target name="test" depends="compile,compile-test">
+        <testng classpathref="test.class.path"
+                haltOnFailure="true" verbose="2">
+            <classfileset dir="${interpreter.test.classes}" includes="**/*.class" />
+            <jvmarg value="-Xverify:none" />
+        </testng>
+    </target>
+
+    <target name="dist" depends="compile">
+        <jar jarfile="${interpreter.jar}" basedir="${interpreter.classes}"/>
+    </target>
+
+</project>
\ No newline at end of file