Skip to content

Commit

Permalink
Adding missing Ant properties when disabling tests
Browse files Browse the repository at this point in the history
- Adding Description to Ant tasks
- Removing unneeded sourceLevel argument in Elemental

Change-Id: Ib203e0828903932e95dc09b610fdafeffdb72950
  • Loading branch information
manolo committed Feb 17, 2016
1 parent 29b0c37 commit 8c52eb6
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 31 deletions.
55 changes: 30 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

- You need the [GWT tools repository](https://github.com/gwtproject/tools/)
checked out and up-to-date. By default it is expected to be found at `../tools`.
You can override the default location using the GWT_TOOLS environment variable
You can override the default location using the GWT_TOOLS environment variable
or passing `-Dgwt.tools=` argument to ant.

- To create the SDK distribution files run:
Expand Down Expand Up @@ -89,29 +89,29 @@

`$ ( cd user && ant test -Dtest.emma.htmlunit.disable=true ; cd .. )`

Module | Task | Property to skip
-------------- | ---------------------- | ----------------
dev | test | test.dev.disable
codeserver | test | test.codeserver.disable
user | test | test.user.disable
user | test.nongwt | test.nongwt.disable
user | test.dev.htmlunit | test.dev.htmlunit.disable
user | test.web.htmlunit | test.web.htmlunit.disable
user | test.draft.htmlunit | test.draft.htmlunit.disable
user | test.nometa.htmlunit | test.nometa.htmlunit.disable
user | test.emma.htmlunit | test.emma.htmlunit.disable
user | test.coverage.htmlunit | test.coverage.htmlunit.disable
user | test.dev.selenium | test.dev.selenium.disable
user | test.web.selenium | test.web.selenium.disable
user | test.draft.selenium | test.draft.selenium.disable
user | test.nometa.selenium | test.nometa.selenium.disable
user | test.emma.selenium | test.emma.selenium.disable
requestfactory | test |
elemental | test |
elemental | test.nongwt |
elemental | test.dev.htmlunit |
elemental | test.web.htmlunit |
tools | test |
Module | Task | Property to skip | Description
-------------- | ---------------------- | ------------------------------ | ----------------------
dev | test | test.dev.disable | GWT compiler & dev libraries
codeserver | test | test.codeserver.disable | SuperDevMode server
user | test | test.user.disable | GWT user API and JRE emulation
user | test.nongwt | test.nongwt.disable | Run tests that not require GWTTestCase
user | test.dev.htmlunit | test.dev.htmlunit.disable | Run dev-mode tests with HtmlUnit
user | test.web.htmlunit | test.web.htmlunit.disable | Run web-mode tests with HtmlUnit
user | test.draft.htmlunit | test.draft.htmlunit.disable | Run draft compiled HtmlUnit tests
user | test.nometa.htmlunit | test.nometa.htmlunit.disable | Run -XdisableClassMetadata tests with HtmlUnit
user | test.emma.htmlunit | test.emma.htmlunit.disable | Run emma tests with HtmlUnit
user | test.coverage.htmlunit | test.coverage.htmlunit.disable | Run tests for coverage support
user | test.dev.selenium | test.dev.selenium.disable | Run dev-mode tests using Selenium RC servers
user | test.web.selenium | test.web.selenium.disable | Run web tests using Selenium RC servers
user | test.draft.selenium | test.draft.selenium.disable | Run draft compiled tests using Selenium RC servers
user | test.nometa.selenium | test.nometa.selenium.disable | Run -XdisableClassMetadata tests using Selenium RC servers
user | test.emma.selenium | test.emma.selenium.disable | Run emma tests with Selenium RC servers
requestfactory | test | test.requestfactory.disable | Request Factory library
elemental | test | test.elemental.disable | Elemental library
elemental | test.nongwt | test.nongwt.disable | Run elemental tests that not require GWTTestCase
elemental | test.dev.htmlunit | test.dev.htmlunit.disable | Run elemental dev-mode tests with HtmlUnit
elemental | test.web.htmlunit | test.web.htmlunit.disable | Run elemental web-mode tests with HtmlUnit
tools | test | test.tools.disable | Some tools used in GWT development

Additionally you can utilize some variables to filter which test to run in each task:

Expand Down Expand Up @@ -193,7 +193,12 @@
or

```
$ ant user -Dtarget=test -Dtest.dev.disable=true \
$ ant user -Dtarget=test
-Dtest.dev.disable=true \
-Dtest.codeserver.disable=true \
-Dtest.requestfactory.disable=true \
-Dtest.elemental.disable=true \
-Dtest.tools.disable=true \
-Dtest.dev.htmlunit.disable=true \
-Dtest.web.htmlunit.disable=true \
-Dtest.coverage.htmlunit.disable=true \
Expand Down
4 changes: 3 additions & 1 deletion dev/codeserver/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
</gwt.jar>
</target>

<target name="test" depends="build, compile.tests" description="Run tests">
<target name="test" depends="build, compile.tests"
unless="test.codeserver.disable"
description="Run tests">
<mkdir dir="${junit.out}/codeserver" />
<fileset id="tests" dir="${javac.junit.out}"
includes="**/*Test.class" />
Expand Down
9 changes: 6 additions & 3 deletions elemental/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,26 @@
</macrodef>

<target name="test.dev.htmlunit" if="generated" depends="compile.tests"
unless="test.dev.htmlunit.disable"
description="Run tests with HtmlUnit in dev mode">
<run-tests output="${junit.out}/dev" args="${test.args} -devMode" classes="**/AllTests.class"/>
</target>

<target name="test.web.htmlunit" if="generated" depends="compile.tests"
unless="test.web.htmlunit.disable"
description="Run tests with HtmlUnit in prod mode">
<run-tests output="${junit.out}/web" args="${test.args} -prod" classes="**/AllTests.class"/>
</target>

<target name="test.nongwt" if="generated" depends="compile.tests"
unless="test.nongwt.disable"
description="Run tests in the JVM">
<run-tests output="${junit.out}/nongwt" args="" classes="**/*JreTest.class"/>
</target>

<target name="test" description="Run tests">
<target name="test"
unless="test.elemental.disable"
description="Run all Elemental tests">
<antcall target="test.nongwt" />
<antcall target="test.web.htmlunit" />
<antcall target="test.dev.htmlunit" />
Expand All @@ -109,8 +114,6 @@
<jvmarg value="-Xmx512M" />
<module />
<arg value="-strict" />
<arg value="-sourceLevel" />
<arg value="${javac.source}" />
<arg value="-out" />
<arg value="${project.build}/bin" />
</java>
Expand Down
4 changes: 3 additions & 1 deletion requestfactory/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
</target>

<!-- This target requires classes from ../build/{dev,user}/bin-test -->
<target name="requestfactory-test" description="Build RequestFactory test source/class jar">
<target name="requestfactory-test"
unless="test.requestfactory.disable"
description="Build RequestFactory test source/class jar">
<requestfactory-jar target="test" />
<requestfactory-jar target="test-src" />
</target>
Expand Down
4 changes: 3 additions & 1 deletion tools/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
</antcall>
</target>

<target name="test" depends="build" description="Test each subfolder">
<target name="test" depends="build"
unless="test.tools.disable"
description="Test each subfolder">
<antcall target="-do">
<param name="target" value="test" />
</antcall>
Expand Down

0 comments on commit 8c52eb6

Please sign in to comment.