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 852921 Details for
Bug 1055803
hwcert-backend certify doesn't run expected tests
[?]
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]
patch to fix logic when no certification ID is set
0002-1055803-hwcert-backend-certify-doesn-t-run-expected-.patch (text/plain), 4.29 KB, created by
Greg Nichols
on 2014-01-21 00:19:37 UTC
(
hide
)
Description:
patch to fix logic when no certification ID is set
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2014-01-21 00:19:37 UTC
Size:
4.29 KB
patch
obsolete
>From 10db33dfaf5a524509f06b03ef39d1a1dbad42fd Mon Sep 17 00:00:00 2001 >From: Greg Nichols <gnichols@redhat.com> >Date: Mon, 20 Jan 2014 19:18:20 -0500 >Subject: [PATCH 2/2] 1055803 - hwcert-backend certify doesn't run expected > tests > >--- > hwcert/catalog.py | 14 +++++++++++--- > hwcert/resultsengine.py | 34 +++++++++++++++++----------------- > 2 files changed, 28 insertions(+), 20 deletions(-) > >diff --git a/hwcert/catalog.py b/hwcert/catalog.py >index 253382b..6fdee5a 100644 >--- a/hwcert/catalog.py >+++ b/hwcert/catalog.py >@@ -265,12 +265,18 @@ class Catalog(Controller): > return False > > def getOpenTests(self, resultsDocument): >+ """ returns a list of open tests (possibly empty), or None if there's no >+ certification associated with the results. """ > > openTests = list() > >- if resultsDocument.getCertificationID() <= 0 or not self.ui.promptConfirm("Would you like to check for open tests for this certification?"): >- if self.debug != Constants.off: >- print "Skipping checking of open tests" >+ if resultsDocument.getCertificationID() <= 0: >+ print "There is no certification associated with these test results." >+ if not self.getCertificationID(resultsDocument): >+ return None >+ # otherwise >+ if not self.ui.promptConfirm("Would you like to check for open tests for this certification?"): >+ print "Skipping checking of open tests" > return None > > # otherwise >@@ -298,12 +304,14 @@ class Catalog(Controller): > except xmlrpclib.Fault, error: > print "Error: could not get test plan from hardware catalog:" > if not self.handleRPCException(error): >+ self.ui.promptConfirm("Continue?") > return None > except Exception, e: > print "Error: could not check open tests." > print e > return None > >+ > def handleRPCException(self, rpcException): > print " Fault code: %s" % rpcException.faultCode > print " Fault string: %s" % rpcException.faultString >diff --git a/hwcert/resultsengine.py b/hwcert/resultsengine.py >index acb6208..6e07775 100644 >--- a/hwcert/resultsengine.py >+++ b/hwcert/resultsengine.py >@@ -25,7 +25,6 @@ class ResultsEngine: > def __init__(self, certification): > self.certification = certification > >- > def getRemainingTests(self, catalog): > tests = self.certification.getTests() > mandatoryTests = self.certification.getMandatoryTests() >@@ -59,22 +58,23 @@ class ResultsEngine: > if not test.isDeleted(): > remainingTests.append(test) > >- # if linked to an open certification, check the catalog for open tests >- if self.certification.getCertificationID(): >- print "Checking catalog for open tests" >- openTests = catalog.getOpenTests(self.certification) > >- # filter remaining tests by open tests >- if openTests: >- print "The following tests are still open: %s" % (", ".join(openTests)).lower() >- tests = remainingTests >- remainingTests = list() >- for test in tests: >- if test.getName().upper() in openTests: >- remainingTests.append(test) >- else: >- print "There are no open tests remaining in the certification" >- return list() >+ print "Checking catalog for open tests" >+ openTests = catalog.getOpenTests(self.certification) > >- return remainingTests >+ # filter remaining tests by open tests >+ if openTests == None: # no cert is associated with the results, or skipped checking it. >+ return remainingTests > >+ if openTests: # if there's a list, (possibly empty) >+ print "The following tests are still open: %s" % (", ".join(openTests)).lower() >+ tests = remainingTests >+ remainingTests = list() >+ for test in tests: >+ if test.getName().upper() in openTests: >+ remainingTests.append(test) >+ else: >+ print "There are no open tests remaining in the certification" >+ return list() >+ >+ return remainingTests >-- >1.8.4.2 >
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 1055803
: 852921