From: <kz...@us...> - 2007-01-05 02:56:58
|
Revision: 3044 http://svn.sourceforge.net/jython/?rev=3044&view=rev Author: kzuberi Date: 2007-01-04 18:56:56 -0800 (Thu, 04 Jan 2007) Log Message: ----------- attempt a magic auto-configurator for bugtests, and add convenience targets for running the test suites (admittedly of marginal utility) Modified Paths: -------------- trunk/jython/build.xml Modified: trunk/jython/build.xml =================================================================== --- trunk/jython/build.xml 2007-01-05 01:27:11 UTC (rev 3043) +++ trunk/jython/build.xml 2007-01-05 02:56:56 UTC (rev 3044) @@ -202,6 +202,7 @@ <property name="source.dir" value="${basedir}/src" /> <property name="templates.dir" value="${basedir}/src/templates" /> <property name="python.lib" value="${basedir}/CPythonLib" /> + <property name="bugtests.dir" value="${basedir}/bugtests" /> </target> @@ -686,5 +687,53 @@ </jar> </target> + <!-- run regression test suite --> + <target name="regrtest" depends="developer-init, post-init"> + <java classname="org.python.util.jython" fork="true"> + <jvmarg value="-Dpython.home=${dist.dir}"/> + <arg value="${dist.dir}/Lib/test/regrtest.py"/> + <classpath> + <pathelement location="${dist.dir}/jython.jar"/> + </classpath> + </java> + </target> + <!-- run bugtests, create a config if necessary --> + <target name="bugtest" depends="developer-init, post-init, create-bugtest-config"> + <java classname="org.python.util.jython" fork="true" dir="${bugtests.dir}"> + <classpath> + <pathelement location="${dist.dir}/jython.jar"/> + </classpath> + <jvmarg value="-Dpython.home=${dist.dir}"/> + <arg value="driver.py"/> + </java> + </target> + + <!-- create support_config.py in the bugtset directory only if it doesn't already exist --> + <target name="create-bugtest-config" depends="developer-init, post-init, check-bugtest-config" unless="have_bugtest_config"> + <!-- doesn't seem to be a direct way to get at the path to javac, + java.home points to the jre folder. The following assumes a standard + jdk layout. Alternative is to try something like: + + <property environment="env"/> + <property name="jdk.home" value="${env.JAVA_HOME}" /> + + or set jdk.home explicitly + --> + <echo>creating ${bugtests.dir}/support_config.py</echo> + <property name="jdk.home" value="${java.home}/.." /> + <echo file="${bugtests.dir}/support_config.py"> +# this configuration was auto-generated by ant build script, +# safe to edit by hand (won't be overwritten) +java_home="${jdk.home}" +jython_home="${dist.dir}" +classpath="${dist.dir}/jython.jar${path.separator}classes" + </echo> + </target> + + <!-- set property have_bugtest_config if support_config.py already exists in the bugtest directory --> + <target name="check-bugtest-config"> + <available property="have_bugtest_config" file="${bugtests.dir}/support_config.py"/> + </target> + </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |