Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added <jstestdriver> and cleaned up <yuicompressor>

  • Loading branch information...
commit 3a8223c21410daf40bea7051f7c86c73c4dd47fb 1 parent bf2989b
@nzakas authored
View
7 buildr.properties
@@ -26,6 +26,13 @@ buildr.jshint = jshint.js
buildr.jshint.path = ${buildr.lib.dir}/${buildr.jshint}
buildr.jshint.opts = curly=true,forin=true,latedef=true,noempty=true,undef=true,rhino=false
+# JsTestDriver
+buildr.jstestdriver = JsTestDriver-1.3.3d.jar
+buildr.jstestdriver.path = ${buildr.lib.dir}/${buildr.jstestdriver}
+buildr.jstestdriver.port = 4224
+buildr.jstestdriver.browser =
+buildr.jstestdriver.tests = all
+
# PhantomJS
buildr.phantomjs = phantomjs
View
54 macros/jstestdriver.xml
@@ -0,0 +1,54 @@
+<project name="jstestdriver">
+
+ <!-- macro to minify files -->
+ <macrodef name="jstestdriver">
+
+ <attribute name="outputdir"/>
+ <attribute name="config" />
+ <attribute name="tests" default="${buildr.jstestdriver.tests}" />
+ <attribute name="port" default="${buildr.jstestdriver.port}" />
+ <attribute name="browser" default="${buildr.jstestdriver.browser}" />
+ <attribute name="failonerror" default="true" />
+ <element name="files" implicit="true"/>
+
+ <sequential>
+ <echo>Testing with JsTestDriver</echo>
+ <script language="javascript"><![CDATA[
+ var config = "@{config}",
+ browser = "@{browser}",
+ options = "";
+
+ if (config) {
+ options += " --config " + config;
+ }
+
+ if (browser) {
+ options += " --browser " + browser;
+ }
+
+ project.setProperty("buildr.jstestdriver.options", options);
+
+ ]]></script>
+ <apply executable="java" parallel="false" failonerror="@{failonerror}">
+ <files/>
+
+ <arg line="-jar"/>
+ <arg path="${buildr.jstestdriver.path}"/>
+
+ <arg line="--testOutput"/>
+ <arg path="@{outputdir}"/>
+
+ <arg line="--tests"/>
+ <arg path="@{tests}"/>
+
+ <arg line="--port"/>
+ <arg path="@{port}"/>
+
+ <arg line="${buildr.jstestdriver.options}"/>
+
+ <srcfile/>
+
+ </apply>
+ </sequential>
+ </macrodef>
+</project>
View
3  macros/yuicompressor.xml
@@ -15,9 +15,6 @@
<sequential>
<echo>Minifying with YUI Compressor</echo>
- <pathconvert pathsep=";" property="buildr.yuicompressor.files">
- <files/>
- </pathconvert>
<script language="javascript"><![CDATA[
var nomunge = "@{nomunge}",
charset = "@{charset}",
Please sign in to comment.
Something went wrong with that request. Please try again.