Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 834837 Details for
Bug 1038354
hwcert-client no longer logging "Test Parameters"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
additional patch storing parameters as name/value pairs
0003-1038354-hwcert-client-no-longer-logging-Test-Paramet.patch (text/plain), 4.26 KB, created by
Greg Nichols
on 2013-12-10 15:33:42 UTC
(
hide
)
Description:
additional patch storing parameters as name/value pairs
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2013-12-10 15:33:42 UTC
Size:
4.26 KB
patch
obsolete
>From 51b1b0fd0f62f46f9d6805306f44166136820f61 Mon Sep 17 00:00:00 2001 >From: Greg Nichols <gnichols@redhat.com> >Date: Tue, 10 Dec 2013 10:30:25 -0500 >Subject: [PATCH 3/3] 1038354 - hwcert-client no longer logging Test Parameters > >--- > hwcert/harness.py | 2 +- > hwcert/rundocument.py | 12 +++++++----- > hwcert/test.py | 29 +++++++++++++---------------- > 3 files changed, 21 insertions(+), 22 deletions(-) > >diff --git a/hwcert/harness.py b/hwcert/harness.py >index 939ec66..8d4016c 100644 >--- a/hwcert/harness.py >+++ b/hwcert/harness.py >@@ -938,7 +938,7 @@ class HardwareTestHarness(Controller): > testParameters = TestParameters(self, testDocument) > testParameters.set(Constants.OUTPUTFILE, outputFilePath) > test.setParameters(testParameters) >- run.setParameters("%s" % testParameters) # log them in the run document >+ run.setParameters(testParameters.getAll()) # log them in the run document > if self.options.debug != Constants.off: > print "Test Parameters: %s" % testParameters > rv = test.run() >diff --git a/hwcert/rundocument.py b/hwcert/rundocument.py >index 2811a2f..030f362 100644 >--- a/hwcert/rundocument.py >+++ b/hwcert/rundocument.py >@@ -99,11 +99,13 @@ class RunDocument(DocumentWrapper): > > def setParameters(self, parameters): > parametersElement = self.findOrCreateElement(self.element, Tags.parameters) >- try: >- parametersElement.childNodes[0].data = parameters >- except IndexError: >- textNode = self.document.createTextNode(parameters) >- parametersElement.appendChild(textNode) >+ for (key, value) in parameters.iteritems(): >+ # only create a property element if the value is there (some string, non-zero integer, or True). >+ if value: >+ propertyElement = self.document.createElement(Tags.property) >+ self.setAttribute(propertyElement, Tags.name, key) >+ self.setTextNode(propertyElement, "%s" % value) >+ parametersElement.appendChild(propertyElement) > > def wasRun(self): > return self.getSummary() != None >diff --git a/hwcert/test.py b/hwcert/test.py >index 0dd01d7..5dbc539 100644 >--- a/hwcert/test.py >+++ b/hwcert/test.py >@@ -571,13 +571,13 @@ class Test(CommandLineUI): > > #otherwise > return True >- >+ > class TestParameters: >- >+ > def __init__(self, harness, testDocument = None): > self.parameters = dict() > self.testDocument = testDocument >- >+ > # 1) try and get them from the environment > names = [Constants.OUTPUTFILE, Constants.UDI, Constants.RUNMODE, Constants.TESTSERVER, Constants.DEVICE, Constants.INCOMPLETE] > for name in names: >@@ -585,44 +585,41 @@ class TestParameters: > self.parameters[name] = os.environ[name] > except KeyError: > pass >- >+ > # 2 get them from the harness/options > if harness.options.server: > self.parameters[Constants.TESTSERVER] = harness.options.server > elif harness.certification and harness.certification.getTestServer(): > self.parameters[Constants.TESTSERVER] = harness.certification.getTestServer() >- >+ > self.parameters[Constants.DEBUG] = harness.options.debug > self.parameters[Constants.RUNMODE] = harness.options.mode >- >+ > if harness.command == "continue": > self.parameters[Constants.INCOMPLETE] = "1" >- >- >+ > # 2) try and get them from the testDocument > if self.testDocument: > map = [(Constants.DEVICE, testDocument.getLogicalDeviceName), (Constants.UDI, testDocument.getUDI)] > for (name, function) in map: > self.parameters[name] = function() >- >+ > def __str__(self): > str = "" > for (key, value) in self.parameters.iteritems(): > str += "%s=%s " % (key, value) > return str >- >+ > def get(self, name): > try: > return self.parameters[name] > except KeyError: > return None >- >+ > def set(self, name, value): > self.parameters[name] = value >- >- >- > >- >+ def getAll(self): >+ return self.parameters >+ > >- >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1038354
:
832919
| 834837