Created
February 1, 2012 15:43
-
-
Save omnicolor/1717620 to your computer and use it in GitHub Desktop.
Closure unit testing build target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="test-js"> | |
<echo message="Running javascript unit tests" /> | |
<concat destfile="tests-concat.js"> | |
<fileset dir="tests" includes="*Test.js" /> | |
</concat> | |
<exec executable="${library}/bin/calcdeps.py"> | |
<arg value="--compiler_flag=--compilation_level=WHITESPACE_ONLY" /> | |
<arg value="--compiler_jar=${compiler}" /> | |
<arg value="--input=scripts/foo.js" /> | |
<arg value="--input=tests-concat.js" /> | |
<arg value="--input=tests/testRunner.js" /> | |
<arg value="--path=${library}" /> | |
<arg value="--output_file=tests.js" /> | |
<arg value="--output_mode=compiled" /> | |
</exec> | |
<concat destfile="tests.js" append="yes"> | |
phantom.exit(); | |
</concat> | |
<delete file="tests-concat.js" /> | |
<exec executable="${phantomjs}" outputproperty="test-results"> | |
<arg value="tests.js" /> | |
</exec> | |
<delete file="tests.js" /> | |
<echo message="Running javascript unit tests" /> | |
<echo message="${test-results}" /> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment