Skip to content

Commit

Permalink
Merge branch '58-rewrite-build-script-to-enable-ant-validation-like-s…
Browse files Browse the repository at this point in the history
…tandalone' into 'master'

Resolve "rewrite build script to enable ant validation like standalone"

Closes #58

See merge request xrechnung/validator-configuration-xrechnung!48
  • Loading branch information
bdewein committed Sep 30, 2022
2 parents b6ddf9e + aee030d commit 26672f3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This release is compatible with XRechnung ?.?.?
### Added

* Test to monitor implementation of HUF rounding rules
* infrastructure to validate custom tests via Ant target `create-validator-reports-from-custom-tests`

### Changed

Expand Down
24 changes: 22 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<property name="dist.dir" location="${basedir}/dist" />
<property name="test.src.dir" location="${src.dir}/test" />
<property name="test.build.dir" location="${build.dir}/test" />
<property name="test.docs.custom.dir" location="${test.src.dir}/custom"></property>
<property name="test.docs.dir" location="${test.build.dir}" />
<property name="test.docs.cen.unit.unexpected.dir" location="${test.docs.dir}/unexpected" />
<property name="test.docs.cen.unit.dir" location="${test.docs.dir}/cen-unit-test" />
Expand Down Expand Up @@ -527,7 +528,6 @@
</xslt>
</target>


<target name="test-validator-assertions"
depends="init-test,provide-validator,test-validator-assertions-only,test-validator-report-with-schema-only"
description="Test XRechnung Configuration">
Expand Down Expand Up @@ -599,6 +599,26 @@
</java>
</target>

<target name="create-validator-reports-from-custom-tests"
depends="init-test, provide-validator"
description="Validate custom test" unless="test.skip">
<fail unless="test.docs.custom.dir"
message="Property test.docs.custom.dir must exist for this target to work" />

<echo>Creating validation reports with ${lib.dir}/${validator.jar} for ${test.docs.custom.dir}.</echo>
<java jar="${lib.dir}/${validator.jar}" failonerror="true" fork="true" dir="${build.dir}">
<arg value="-s" />
<arg value="scenarios.xml" />
<arg value="-r" />
<arg value="${build.dir}" />
<arg value="--html" />
<arg value="-o" />
<arg value="${reports.dir}/custom-tests" />
<arg value="${test.docs.custom.dir}" />

</java>
</target>

<target name="retrieve-xmute" depends="init">
<fail unless="xmute.download.url.prefix"
message="Property xmute.download.url.prefix must exist for this target to work" />
Expand Down Expand Up @@ -680,7 +700,7 @@


<target name="test"
depends="init-test, test-validator-assertions,create-validator-reports-from-testsuite, test-cen-expected-behaviour, test-integration">
depends="init-test, test-validator-assertions,create-validator-reports-from-testsuite, test-cen-expected-behaviour, test-integration, create-validator-reports-from-custom-tests">
<echo message="Testing all" />
</target>

Expand Down
Empty file added src/test/custom/.gitkeep
Empty file.

0 comments on commit 26672f3

Please sign in to comment.