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 635699 Details for
Bug 843194
Support v7 call home to compare test plans using the certify command
[?]
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]
v7 certify patch to optionally check hw catalog for open tests
open-tests.patch (text/plain), 4.89 KB, created by
Greg Nichols
on 2012-10-30 17:25:34 UTC
(
hide
)
Description:
v7 certify patch to optionally check hw catalog for open tests
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2012-10-30 17:25:34 UTC
Size:
4.89 KB
patch
obsolete
>diff --git a/v7/catalog.py b/v7/catalog.py >index 43a40c1..b5dcf03 100644 >--- a/v7/catalog.py >+++ b/v7/catalog.py >@@ -27,8 +27,8 @@ from v7.certificationtest import CertificationDocument > > class Catalog(Controller): > >- def __init__(self, environment): >- Controller.__init__(self) >+ def __init__(self, environment, debug=Constants.off): >+ Controller.__init__(self, debug) > self.environment = environment > self.login = None > self.password = None >@@ -204,4 +204,45 @@ class Catalog(Controller): > print "Error: could not submit certification results:" > print e > return False >+ >+ def getOpenTests(self, resultsDocument): >+ >+ 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" >+ return None >+ >+ # otherwise >+ if not self.login or not self.password: >+ self.login = self.ui.prompt("Red Hat Catalog User Name: ") >+ self.password = self.ui.promptPassword("Password: ") >+ >+ sys.stdout.write("Checking certification...") >+ serverProxy = xmlrpclib.ServerProxy(self.environment.getCatalogURL()) >+ try: >+ params = {"login":self.login, >+ "password":self.password, >+ "certid":resultsDocument.getCertificationID()} >+ >+ response = serverProxy.Cert.getOpenTests(params) >+ print " done." >+ if self.debug != Constants.off: >+ print response >+ >+ openTests = response >+ >+ return openTests >+ >+ except xmlrpclib.Fault, error: >+ print "Error: could not get test plan from hardware catalog:" >+ print " Fault code: %s" % error.faultCode >+ print " Fault string: %s" % error.faultString >+ return None >+ except Exception, e: >+ print "Error: could not check open tests." >+ print e >+ return None >+ > >\ No newline at end of file >diff --git a/v7/hal.py b/v7/hal.py >index f2ec0dc..3a756c0 100644 >--- a/v7/hal.py >+++ b/v7/hal.py >@@ -15,6 +15,7 @@ import sys > from v7.device import HalDevice > from v7.deviceDetector import DeviceDetector > from v7.tags import Constants >+from v7.command import Command, V7CommandException > > class Hal(DeviceDetector): > "A class for working with HAL." >diff --git a/v7/hardwaretest.py b/v7/hardwaretest.py >index b6e14ca..d9b61a5 100644 >--- a/v7/hardwaretest.py >+++ b/v7/hardwaretest.py >@@ -64,7 +64,7 @@ class HardwareTestHarness(Controller): > self.command = None > self.virtualization = None > self.redHatRelease = RedHatRelease() >- self.catalog = Catalog(self.environment) >+ self.catalog = Catalog(self.environment, self.options.debug) > > self.commands = {'plan': self.doPlan, > 'verify': self.doVerify, >@@ -877,7 +877,7 @@ class HardwareTestHarness(Controller): > return False > > engine = ResultsEngine(self.certification) >- tests = engine.getRemainingTests() >+ tests = engine.getRemainingTests(self.catalog) > > # for realtime kernel, just look for remaining realtime tests > if self.isRealtime(): >diff --git a/v7/resultsengine.py b/v7/resultsengine.py >index 0b8e24f..5fc6e0f 100644 >--- a/v7/resultsengine.py >+++ b/v7/resultsengine.py >@@ -18,6 +18,7 @@ > import os, sys, shutil, string > > from v7.tags import Constants, Tags >+from v7.catalog import Catalog > > class ResultsEngine: > >@@ -25,7 +26,7 @@ class ResultsEngine: > self.certification = certification > > >- def getRemainingTests(self): >+ def getRemainingTests(self, catalog): > tests = self.certification.getTests() > mandatoryTests = self.certification.getMandatoryTests() > passedTests = dict() >@@ -57,6 +58,22 @@ class ResultsEngine: > except: > if not test.isDeleted(): > remainingTests.append(test) >+ >+ openTests = catalog.getOpenTests(self.certification) >+ >+ # filter remaining tests by open tests >+ if openTests is not None: >+ if len(openTests) > 0: >+ 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 > >
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 843194
: 635699