Author: jbeard
Date: Thu Mar 17 16:22:26 2011
New Revision: 1082578
URL: http://svn.apache.org/viewvc?rev=1082578&view=rev
Log:
Hooked bash-based compilation into unit test process, and updated README.
Modified:
commons/sandbox/gsoc/2010/scxml-js/trunk/README.txt
commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml
commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml
commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/README.txt
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/README.txt?rev=1082578&r1=1082577&r2=1082578&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/README.txt (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/README.txt Thu Mar 17 16:22:26 2011
@@ -82,6 +82,21 @@ Or:
ant run-unit-tests-with-rhino
+
+By default, the JavaScript-based compiler frontend will be used to compile the
+test cases. On Unix systems, however, you can also use the bash-and-xsltproc
+compiler frontend to compile the SCXML test cases instead. This decreases the
+overall time to build and run unit tests by a factor of 15 on jbeard's netbook,
+cutting build time from 30 minutes to 2 minutes. To execute this, use the
+generate-javascript-with-bash property with ant:
+
+ant -Dgenerate-javascript-with-bash property=true run-unit-tests-with-rhino
+
+In the future, the Python-and-lxml2 compiler frontend will also be usable from
+the Ant build script, which should provide a fast and portable solution for
+building the SCXML test cases.
+
+
You can also run unit tests on Microsoft Windows under Mozilla Firefox and
Internet Explorer. To do so, you must, you must have a web server serving files
on port 8080 in the SCXMLcgf/js root directory. Then run:
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml?rev=1082578&r1=1082577&r2=1082578&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml Thu Mar 17
16:22:26 2011
@@ -87,7 +87,6 @@
<property name="path_to_dojo" value="${path_to_dojo_base}/dojo.js"/>
<path id="scxml_tests_xml">
- <!--
<pathelement location="test/kitchen_sink/KitchenSink.xml"/>
<pathelement
location="test/kitchen_sink/KitchenSink_dataModule.xml"/>
<pathelement
location="test/kitchen_sink/KitchenSink_performance.xml"/>
@@ -97,7 +96,6 @@
<pathelement
location="test/event_system_properties/TestEventSystemProperties.xml"/>
<pathelement
location="test/prefix_events/TestPrefixEvents.xml"/>
<pathelement
location="test/targetless-transition/TestTargetlessTransition.xml"/>
- -->
<pathelement location="test/parallel/TestParallel.xml"/>
</path>
@@ -574,7 +572,7 @@
<target name="build-dependency-lists" depends="setup-antcontrib"
unless="skip-building-dependency-lists">
- <for list="${xslt-dep-sources}" param="xslt-dep-source">
+ <for list="${xslt-dep-sources}" param="xslt-dep-source"
parallel="true">
<sequential>
<xslt
classpathref="maven.plugin.classpath"
@@ -605,13 +603,13 @@
<fileset dir="${build-xsl-dep-list}" includes="*.xml"/>
</path>
- <for param="built-dep-list">
+ <for param="built-dep-list" parallel="true">
<path refid="build-xsl-dep-list-path"/>
<sequential>
- <for list="${language-frontends}"
param="language-frontend">
+ <for list="${language-frontends}"
param="language-frontend" parallel="true">
<sequential>
<path
id="@{built-dep-list}-path" location="@{built-dep-list}"/>
@@ -670,6 +668,16 @@
<target name="setup-properties" depends="setup-antcontrib">
+ <condition
property="generate-javascript-with-bash-or-with-python-or-skip-javascript-generation">
+ <or>
+ <isset
property="generate-javascript-with-bash"/>
+ <isset
property="generate-javascript-with-python"/>
+ <isset property="skip-javascript-generation"/>
+ </or>
+ </condition>
+
+ <echo>
generate-javascript-with-bash-or-with-python-or-skip-javascript-generation :
${generate-javascript-with-bash-or-with-python-or-skip-javascript-generation}
</echo>
+
<for param="test-path" parallel="true" threadCount="4">
<path refid="scxml_tests_xml"/>
<sequential>
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=1082578&r1=1082577&r2=1082578&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build.xml Thu Mar 17 16:22:26 2011
@@ -108,7 +108,11 @@
</target>
<target name="generate-javascript-with-bash"
-
depends="setup-properties,preprocess-stylesheets,build-language-frontend-modules,make-sh-modules-executable"
>
+
depends="setup-properties,preprocess-stylesheets,build-language-frontend-modules,make-sh-modules-executable"
+ if="generate-javascript-with-bash"
unless="skip-javascript-generation">
+
+ <echo>Generating JavaScript with Bash frontend...</echo>
+
<!-- should have same behaviour as generate-javascript task -->
<!-- need to map backend to compiled sh frontend -->
@@ -147,7 +151,7 @@
<sequential>
- <for
param="test-path">
+ <for
param="test-path" parallel="true" threadCount="4">
<path
refid="scxml_tests_xml"/>
<sequential>
@@ -171,9 +175,13 @@
</for>
</target>
+ <target name="generate-javascript-with-python"
if="generate-javascript-with-python" unless="skip-javascript-generation">
+ <!-- TODO -->
+ </target>
+
<!-- run unit and performance tests -->
<target name="generate-javascript"
-
depends="setup-properties,preprocess-stylesheets,build-language-frontend-modules,generate-javascript-mvn"/>
+
depends="setup-properties,preprocess-stylesheets,build-language-frontend-modules,generate-javascript-mvn,generate-javascript-with-bash,generate-javascript-with-python"
/>
<target name="generate-unit-test-html" depends="setup-properties">
<mkdir dir="${build}/generate-unit-tests-html"/>
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml?rev=1082578&r1=1082577&r2=1082578&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/mvn-ant-build.xml Thu Mar 17
16:22:26 2011
@@ -73,7 +73,10 @@
<!-- unit test stuff -->
- <target name="generate-javascript-mvn" depends="setup-properties"
unless="skip-javascript-generation">
+ <target name="generate-javascript-mvn" depends="setup-properties"
unless="generate-javascript-with-bash-or-with-python-or-skip-javascript-generation">
+
+ <echo>Generating JavaScript with Rhino frontend...</echo>
+
<mkdir dir="${build}/generate-javascript"/>
<for list="${for-ie}" param="for-ie">