-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expath#40 fix code coverage #80
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR-76 issue #66 allow context in named templates
- fix code coverage in shell script - update Java class XSLTCoverageTraceListener for SaxonEE/PE 9.7 - unit tests for shell script
# The first commit's message is: #2 initial commit # This is the 2nd commit message: add saxon9he # This is the 3rd commit message: remove cat and saxon # This is the 4th commit message: add tests
- replace saxon:serialize() with fn:serialize and use XSLT 3.0 - output error message for Saxon8 and Saxon8-SA - update XSpec unit test (unit test requires support for XSLT 3.0 to run as requested in #74) - update bats unit test
I originally committed this pull request from my branch develop. As I am going to develop more code in that branch I isolated the changes made for this pull request in branch bugfix/code-coverage. Branch bugfix/code-coverage only contains the changes for this specific pull request. If the pull request is accepted the merge into the mainstream XSpec project should be done from branch bugfix/code-coverage. |
override TEST_DIR if set externally
output HTML report to custom directory if TEST_DIR is set as environment variable
output HTML report to custom directory if TEST_DIR is set as environment variable
- test naming collision in result file when a function read a document containing more than 100 nodes
- update travis configuration after repo transfer - move location of Saxon processor and add license information
- remove Saxon binaries - amend travis configuration to download Saxon jar file from Maven repo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes the code coverage which has been broken since the release of Saxon 9.3 few years ago. The code coverage relies on having SaxonEE9 or SaxonPE9 as extension functions are available only with these two versions of Saxon (http://www.saxonica.com/html/documentation/extensions/functions/saxon-extension-functions.html).
This is an example of code coverage with the provided tutorial example:
Technical notes
I describe here in more detail the changes I made.
My starting point was this thread on the Google Groups forum. I reused the example provided by Vasu Chakkera for XSLTCoverageTraceListener.java and updated it for SaxonEE 9.7. I fixed compilation errors by updating Java imported classed. I also fixed compilation warnings by specifying the types in the declaration of HashMap and HashSet.
I changed the shell script xspec.sh in order to stop the code coverage execution if Saxon9EE or Saxon9PE are not detected. When the pull request is approved and merged I'll implement the same behaviour in the Windows batch script (not really my cup of tea but I guess it's used). I would suggest to remove the deprecated coverage option (i.e. coverage instead of -c) as code coverage has been broken for few years and it's time to finally deprecate this option.
I wrote few basic unit tests for the shell script xspec.sh using the Bats framework. The tests are in xspec.bats and included in this pull request. They test that the code coverage is executed only when Saxon9EE or Saxon9PE is available.