This repository was archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Xml generation fixes and tests #320
Merged
dawagner
merged 7 commits into
intel:master
from
dawagner:xml-generation-fixes-and-tests
Dec 17, 2015
Merged
Xml generation fixes and tests #320
dawagner
merged 7 commits into
intel:master
from
dawagner:xml-generation-fixes-and-tests
Dec 17, 2015
Conversation
This file contains hidden or 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
|
coverage increased by +0.8% |
036f55d to
26cd7e0
Compare
hostDomainGenerator.sh isn't maintained and we don't know of anyone using it. portAllocator.py is only use by hostDomainGenerator.sh and can be removed too. Signed-off-by: David Wagner <[email protected]>
Signed-off-by: David Wagner <[email protected]>
We don't have any test for this script and so, it was broken without anyone noticing. Signed-off-by: David Wagner <[email protected]>
Add a trailing directory separator to them to disambiguate them from file names (needed by some path-handling functions within the Parameter Framework). Signed-off-by: David Wagner <[email protected]>
If the base URI is not transmitted to files included with "FileIncluder" (i.e. SubsystemInclude tags), schema validation cannot take place. Signed-off-by: David Wagner <[email protected]>
|
👎 |
26cd7e0 to
27d0dad
Compare
|
@tcahuzax I have addressed your comments. |
This attribute only makes sense for the XML parser (e.g. libxml2) but since we
don't make libxml2 automatically validate our files (we only do it manually),
we don't need this attribute.
Moreover, this attribute is hard to use:
- when it is set to a relative path, the file containing it cannot be moved;
- when set to an absolute path, it can't be copied between machines without
modifying that attribute.
We used to set it to a base name ("FooBard.xsd") which was the name of the root
element contatenated with ".xsd" but this is redundant. In tests, it also led
to generating documents with this attribute and a root element that does not
have a corresponding standalone XSD (e.g. ParameterBlock does not have its own
XSD). For instance:
<ParameterBlock xsi:noNamespaceSchemaLocation="ParameterBlock.xsd">
When trying to validate a file, just rely on the base dir provided by the user
and the root element name in order to find the corresponding XSD file.
Signed-off-by: David Wagner <[email protected]>
Introduce basic tests for domainGenerator.py. No error case is covered yet. As it stood, the XML validity checking code wasn't covered. This new test also covers it. Same applies for <xi:include> tags: there wasn't any test suite using them. This one does. Each of these features should have their own test but this is a quick and easy solution. Signed-off-by: David Wagner <[email protected]>
|
|
dawagner
added a commit
that referenced
this pull request
Dec 17, 2015
Xml generation/validation fixes and tests - change how schema are found and XML files validated - fix the XML generation script - add XML generation tests
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
@tcahuzax please review.
