提交 923ff3aa 编写于 作者: C Cleber Rosa

selftests/unit/test_xunit.py: specify JUnit variation used

It's not easy to find one definitive specification for the the JUnit /
Xunit formats, and a number of different schemas have been published
by different entities.

The current schema version we ship was based on a repository that is
no longer available.  Even though the format is exactly the same,
let's switch to the schema hosted by the JUnit project, and to what
is considered the Jenkins schema (as part of the JUnit 5 project).

Reference: https://junit.org/junit5/
Reference: https://raw.githubusercontent.com/junit-team/junit5/master/platform-tests/src/test/resources/jenkins-junit.xsdSigned-off-by: NCleber Rosa <crosa@redhat.com>
上级 c31cb890
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Source: https://svn.jenkins-ci.org/trunk/hudson/dtkit/dtkit-format/dtkit-junit-model/src/main/resources/com/thalesgroup/dtkit/junit/model/xsd/junit-4.xsd
This file available under the terms of the MIT License as follows:
*******************************************************************************
* Copyright (c) 2010 Thales Corporate Services SAS *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy *
* of this software and associated documentation files (the "Software"), to deal*
* in the Software without restriction, including without limitation the rights *
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,*
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN *
* THE SOFTWARE. *
********************************************************************************
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="failure">
......
......@@ -1192,7 +1192,7 @@ class PluginsXunitTest(AbsPluginsTest, unittest.TestCase):
def setUp(self):
self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__)
junit_xsd = os.path.join(os.path.dirname(__file__),
os.path.pardir, ".data", 'junit-4.xsd')
os.path.pardir, ".data", 'jenkins-junit.xsd')
self.junit = os.path.abspath(junit_xsd)
super(PluginsXunitTest, self).setUp()
......
......@@ -85,7 +85,8 @@ class xUnitSucceedTest(unittest.TestCase):
self.assertEqual(len(els), 1)
junit_xsd = os.path.abspath(os.path.join(os.path.dirname(__file__),
os.path.pardir, ".data", 'junit-4.xsd'))
os.path.pardir, ".data",
'jenkins-junit.xsd'))
with open(junit_xsd, 'r') as f:
xmlschema = etree.XMLSchema(etree.parse(f)) # pylint: disable=I1101
# pylint: disable=I1101
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册