New build options -DtestDebug="true" and -DtestSkip="false"

I have just added two new build flags for Lucee 6.0

-DtestDebug="true"

any tests which don’t compile are automatically skipped (we can’t check the meta data), when enabled this will output the compile errors

[java]    [script] ERROR: [C:\work\lucee6\test\tickets\_LDEV1813.cfc] threw Syntax Error, Invalid Construct
[java]    [script] C:\work\lucee6\test\tickets\_LDEV1813.cfc :: Syntax Error, Invalid Construct
[java]    [script] ERROR: [C:\work\lucee6\test\tickets\_LDEV2337.cfc] threw Missing [;] or [line feed] after expression
[java]    [script] C:\work\lucee6\test\tickets\_LDEV2337.cfc :: Missing [;] or [line feed] after expression

It will also output the reasons why a test is filtered

[java]    [script] -------------- Start Tests -----------
[java]    [script] C:\work\lucee6\test\cache\Memcached.cfc :: excluded by testFilter
[java]    [script] C:\work\lucee6\test\cache\MemcachedV3.cfc :: excluded by testFilter
[java]    [script] C:\work\lucee6\test\datasource\HSQLDB.cfc :: excluded by testFilter
[java]    [script] C:\work\lucee6\test\datasource\mongodb\Application.cfc :: excluded by testFilter
[java]    [script] C:\work\lucee6\test\datasource\MongoDB.cfc :: excluded by testFilter
[java]    [script] C:\work\lucee6\test\components\Administrator\TestArchive\Admin.cfc :: excluded by testFilter
[java]    [script] C:\work\lucee6\test\cache\RAM.cfc :: excluded by testFilter

-DtestSkip="false"

In addition to the traditional TestBox skip="true" approach, Lucee has the convention that any test which is prefixed by an _ is also skipped by default.

Using the following combination, you can now run all the disabled prefixed tests
ant -DtestSkip="false" -DtestFilter="_" -DtestDebug="true"

All the build flags are documented here

1 Like