You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by jb...@apache.org on 2010/08/23 21:44:38 UTC
svn commit: r988272 - /commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml
Author: jbeard
Date: Mon Aug 23 19:44:38 2010
New Revision: 988272
URL: http://svn.apache.org/viewvc?rev=988272&view=rev
Log:
Slight refactoring. Moved the property generation into a single central area. This allowed the removal of the dependency between generate-unit-tests-html task and generate-javascript task.
Modified:
commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml?rev=988272&r1=988271&r2=988272&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml Mon Aug 23 19:44:38 2010
@@ -166,13 +166,9 @@
</chainedmapper>
</mapper>
</xslt>
-
</target>
- <!-- run unit and performance tests -->
- <target name="generate-javascript" depends="preprocess-stylesheets">
- <mkdir dir="build/generate-javascript"/>
-
+ <target name="setup-properties">
<for list="${for-ie}" param="for-ie">
<sequential>
<for list="${backends}" param="backend">
@@ -180,9 +176,8 @@
<for param="test-path">
<path refid="scxml-tests-xml"/>
<sequential>
- <!--
- <echo>@{for-ie},@{backend},@{test-path}</echo>
- -->
+
+ <!-- for generate-javascript task -->
<!-- do some manipulation -->
<pathconvert property="@{for-ie}-@{backend}-@{test-path}-target-test-path">
@@ -195,9 +190,56 @@
<dirname property="@{for-ie}-@{backend}-@{test-path}-target-test-path-dir" file="${@{for-ie}-@{backend}-@{test-path}-target-test-path}"/>
- <echo>${@{for-ie}-@{backend}-@{test-path}-target-test-path}, ${@{for-ie}-@{backend}-@{test-path}-target-test-path-dir}</echo>
+ <!-- for generate-unit-tests-html task -->
- <!-- execute some tasks -->
+ <!-- compute unit test module location -->
+ <!-- to simplify, we expect it to be in a particular location -->
+ <dirname property="@{test-path}-dir" file="@{test-path}"/>
+
+ <!-- convert to relative path -->
+ <pathconvert property="@{for-ie}-@{backend}-@{test-path}-unit-test-js-module">
+ <path location="${@{test-path}-dir}"/>
+ <globmapper from="${basedir}/*" to="*/scripts/unitTest"/>
+ </pathconvert>
+
+ <!-- compute unit test html target location -->
+ <pathconvert property="@{for-ie}-@{backend}-@{test-path}-unit-test-html-location">
+ <path location="${@{for-ie}-@{backend}-@{test-path}-target-test-path}"/>
+ <globmapper from="${basedir}/build/generate-javascript/*.js" to="${basedir}/build/generate-unit-tests-html/*.html"/>
+ </pathconvert>
+
+ <!-- compute relative path to js from html unit test folder -->
+ <pathconvert property="@{for-ie}-@{backend}-@{test-path}-target-test-relative-path">
+ <path location="${@{for-ie}-@{backend}-@{test-path}-target-test-path}"/>
+ <globmapper from="${basedir}/build/*" to="../../../*"/>
+ </pathconvert>
+
+
+ <!-- get the dirname of the html target so we can make the directory structure -->
+ <dirname property="@{for-ie}-@{backend}-@{test-path}-unit-test-html-target-dir" file="${@{for-ie}-@{backend}-@{test-path}-unit-test-html-location}"/>
+
+ </sequential>
+ </for>
+ </sequential>
+ </for>
+ </sequential>
+ </for>
+
+ </target>
+
+ <!-- run unit and performance tests -->
+ <target name="generate-javascript" depends="preprocess-stylesheets,setup-properties">
+ <mkdir dir="build/generate-javascript"/>
+
+ <for list="${for-ie}" param="for-ie">
+ <sequential>
+ <for list="${backends}" param="backend">
+ <sequential>
+ <for param="test-path">
+ <path refid="scxml-tests-xml"/>
+ <sequential>
+
+ <echo>${@{for-ie}-@{backend}-@{test-path}-target-test-path}, ${@{for-ie}-@{backend}-@{test-path}-target-test-path-dir}</echo>
<mkdir dir="${@{for-ie}-@{backend}-@{test-path}-target-test-path-dir}"/>
@@ -224,7 +266,7 @@
</for>
</target>
- <target name="generate-unit-tests-html" depends="generate-javascript">
+ <target name="generate-unit-tests-html" depends="setup-properties">
<mkdir dir="build/generate-unit-tests-html"/>
<for list="${for-ie}" param="for-ie">
@@ -235,34 +277,6 @@
<path refid="scxml-tests-xml"/>
<sequential>
-
-
- <!-- compute unit test module location -->
- <!-- to simplify, we expect it to be in a particular location -->
- <dirname property="@{test-path}-dir" file="@{test-path}"/>
-
- <!-- convert to relative path -->
- <pathconvert property="@{for-ie}-@{backend}-@{test-path}-unit-test-js-module">
- <path location="${@{test-path}-dir}"/>
- <globmapper from="${basedir}/*" to="*/scripts/unitTest"/>
- </pathconvert>
-
- <!-- compute unit test html target location -->
- <pathconvert property="@{for-ie}-@{backend}-@{test-path}-unit-test-html-location">
- <path location="${@{for-ie}-@{backend}-@{test-path}-target-test-path}"/>
- <globmapper from="${basedir}/build/generate-javascript/*.js" to="${basedir}/build/generate-unit-tests-html/*.html"/>
- </pathconvert>
-
- <!-- compute relative path to js from html unit test folder -->
- <pathconvert property="@{for-ie}-@{backend}-@{test-path}-target-test-relative-path">
- <path location="${@{for-ie}-@{backend}-@{test-path}-target-test-path}"/>
- <globmapper from="${basedir}/build/*" to="../../../*"/>
- </pathconvert>
-
-
- <!-- get the dirname of the html target so we can make the directory structure -->
- <dirname property="@{for-ie}-@{backend}-@{test-path}-unit-test-html-target-dir" file="${@{for-ie}-@{backend}-@{test-path}-unit-test-html-location}"/>
-
<echo>${@{for-ie}-@{backend}-@{test-path}-unit-test-js-module},${@{for-ie}-@{backend}-@{test-path}-unit-test-html-location},${@{for-ie}-@{backend}-@{test-path}-unit-test-html-target-dir},${@{for-ie}-@{backend}-@{test-path}-target-test-relative-path}</echo>
<!-- execute some tasks -->