Update xvnc to use convert xml
- Update doc to use 4 space indent syntax - Update test file to be more descriptive - Add minimal test - Add plugin="xvnc" attribute Change-Id: I6b669d3b18fd6efadcbaf1b801242a46d9c2db21 Signed-off-by: Kien Ha <kienha9922@gmail.com>
This commit is contained in:
parent
49be71864a
commit
9746bddc48
|
@ -1819,22 +1819,29 @@ def xvnc(parser, xml_parent, data):
|
||||||
Enable xvnc during the build.
|
Enable xvnc during the build.
|
||||||
Requires the Jenkins :jenkins-wiki:`xvnc plugin <Xvnc+Plugin>`.
|
Requires the Jenkins :jenkins-wiki:`xvnc plugin <Xvnc+Plugin>`.
|
||||||
|
|
||||||
:arg bool screenshot: Take screenshot upon build completion
|
:arg bool screenshot: Take screenshot upon build completion (default false)
|
||||||
(default false)
|
:arg bool xauthority: Create a dedicated Xauthority file per build (default
|
||||||
:arg bool xauthority: Create a dedicated Xauthority file per build
|
true)
|
||||||
(default true)
|
|
||||||
|
|
||||||
Example:
|
Full Example:
|
||||||
|
|
||||||
.. literalinclude:: /../../tests/wrappers/fixtures/xvnc001.yaml
|
.. literalinclude:: /../../tests/wrappers/fixtures/xvnc-full.yaml
|
||||||
|
:language: yaml
|
||||||
|
|
||||||
|
Minimal Example:
|
||||||
|
|
||||||
|
.. literalinclude:: /../../tests/wrappers/fixtures/xvnc-minimal.yaml
|
||||||
|
:language: yaml
|
||||||
"""
|
"""
|
||||||
xwrapper = XML.SubElement(xml_parent,
|
xwrapper = XML.SubElement(xml_parent,
|
||||||
'hudson.plugins.xvnc.Xvnc')
|
'hudson.plugins.xvnc.Xvnc')
|
||||||
XML.SubElement(xwrapper, 'takeScreenshot').text = str(
|
xwrapper.set('plugin', 'xvnc')
|
||||||
data.get('screenshot', False)).lower()
|
|
||||||
XML.SubElement(xwrapper, 'useXauthority').text = str(
|
mapping = [
|
||||||
data.get('xauthority', True)).lower()
|
('screenshot', 'takeScreenshot', False),
|
||||||
|
('xauthority', 'useXauthority', True),
|
||||||
|
]
|
||||||
|
convert_mapping_to_xml(xwrapper, data, mapping, fail_required=True)
|
||||||
|
|
||||||
|
|
||||||
def job_log_logger(parser, xml_parent, data):
|
def job_log_logger(parser, xml_parent, data):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<project>
|
<project>
|
||||||
<buildWrappers>
|
<buildWrappers>
|
||||||
<hudson.plugins.xvnc.Xvnc>
|
<hudson.plugins.xvnc.Xvnc plugin="xvnc">
|
||||||
<takeScreenshot>true</takeScreenshot>
|
<takeScreenshot>true</takeScreenshot>
|
||||||
<useXauthority>false</useXauthority>
|
<useXauthority>false</useXauthority>
|
||||||
</hudson.plugins.xvnc.Xvnc>
|
</hudson.plugins.xvnc.Xvnc>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<buildWrappers>
|
||||||
|
<hudson.plugins.xvnc.Xvnc plugin="xvnc">
|
||||||
|
<takeScreenshot>false</takeScreenshot>
|
||||||
|
<useXauthority>true</useXauthority>
|
||||||
|
</hudson.plugins.xvnc.Xvnc>
|
||||||
|
</buildWrappers>
|
||||||
|
</project>
|
|
@ -0,0 +1,2 @@
|
||||||
|
wrappers:
|
||||||
|
- xvnc
|
Loading…
Reference in New Issue