Skip to content

Commit

Permalink
Allow overriding w32.ascii when running test suite
Browse files Browse the repository at this point in the history
Passing -Dw32.ascii=true or -Dw32.ascii=false on the command line to ANT
will forward the property to the test suite. This allows to run tests on
both the ANSI and the UNICODE versions of the API explicitly.
Not passing the -Dw32.ascii command line option results in the same
behavior as previous versions, i.e. the property is not set.

Signed-off-by: Torbjörn Svensson <[email protected]>
  • Loading branch information
T-Svensson committed Jul 15, 2020
1 parent e857318 commit 95aab8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Next Release (5.7.0)

Features
--------
* [#1231](https://github.com/java-native-access/jna/pull/1231): The test suite can now be executed on Windows using either ANSI or UNICODE win32 API by passing `-Dw32.ascii=true/false` to ant. Previously, UNICODE was always used. - [@T-Svensson](https://github.com/T-Svensson/)

Bug Fixes
---------
Expand Down
5 changes: 5 additions & 0 deletions contrib/platform/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,18 @@ com.sun.jna.platform.wince;version=${osgi.version}
<echo>tests.platform.windows=${tests.platform.windows}</echo>
<echo>tests.platform.linux=${tests.platform.linux}</echo>
<echo>tests.platform.unix=${tests.platform.unix}</echo>
<propertyset id="native.api.windows">
<propertyref name="w32.ascii"/>
</propertyset>
<junit fork="${test.fork}" failureproperty="testfailure" tempdir="${build.dir}">
<!-- optionally run headless -->
<syspropertyset refid="headless"/>
<!-- avoid VM conflicts with JNA protected mode -->
<env key="${ld.preload.name}" file="${libjsig}"/>
<!-- Ignore any system install of JNA -->
<sysproperty key="jna.builddir" file="${file.reference.jna.build}"/>
<!-- Optionally force native API on Windows -->
<syspropertyset refid="native.api.windows"/>
<jvmarg value="${vmopt.arch}"/>
<classpath><path path="${run.test.classpath}"/><path path="${file.reference.jna.build}/test-classes"/></classpath>
<formatter type="brief" usefile="false"/>
Expand Down

0 comments on commit 95aab8f

Please sign in to comment.