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 874071 Details for
Bug 1075782
packaging past results leaves existing results
[?]
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 fixing prompting to save and remove current results if too large
0001-1075782-packaging-past-results-leaves-existing-resul.patch (text/plain), 4.73 KB, created by
Greg Nichols
on 2014-03-13 16:39:03 UTC
(
hide
)
Description:
patch fixing prompting to save and remove current results if too large
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2014-03-13 16:39:03 UTC
Size:
4.73 KB
patch
obsolete
>From 7ce50ab405bfcb0691e9d0d40218efed5e9f8d32 Mon Sep 17 00:00:00 2001 >From: Greg Nichols <gnichols@redhat.com> >Date: Thu, 13 Mar 2014 12:38:02 -0400 >Subject: [PATCH] 1075782 - packaging past results leaves existing results > >--- > hwcert/harness.py | 39 ++++++++++++++++++++++----------------- > 1 file changed, 22 insertions(+), 17 deletions(-) > >diff --git a/hwcert/harness.py b/hwcert/harness.py >index 711d5d7..9bca39b 100644 >--- a/hwcert/harness.py >+++ b/hwcert/harness.py >@@ -47,18 +47,20 @@ class HardwareTestHarness(Controller): > self.makeDirectoryPath(self.environment.getDataDirectory()) > self.redHatRelease = RedHatRelease() > self.catalog = Catalog(self.environment, self.options.debug) >- >+ self.certification = None >+ > def doVersion(self): > print "hwcert version %s, release %s" % (hwcert.version.version, hwcert.version.release) > return True > > def load(self): >- try: >- self.certification = ResultsDocument(self.options.debug != Constants.off) >- if not self.certification.load(self.environment.getResultsPath()): >+ if not self.certification: >+ try: >+ self.certification = ResultsDocument(self.options.debug != Constants.off) >+ if not self.certification.load(self.environment.getResultsPath()): >+ self.certification = None >+ except IOError: > self.certification = None >- except IOError: >- self.certification = None > return > > def doDiscover(self): >@@ -316,9 +318,9 @@ class HardwareTestHarness(Controller): > # otherwise > return True > >- >- > def doRun(self): >+ self.__checkResultsSize() >+ > if not self.doPlan(): > return False > >@@ -337,8 +339,7 @@ class HardwareTestHarness(Controller): > tests = self.certification.getFilteredTests(self.options) > > if len(tests) > 0: >- if not self.__checkResultsSize(): >- return False >+ > tests = self.addMandatoryTests(tests) > if not tests: > return False >@@ -557,6 +558,8 @@ class HardwareTestHarness(Controller): > def doCertify(self): > """ run only tests needed for certification """ > >+ self.__checkResultsSize() >+ > if not self.doPlan(): > return False > >@@ -576,8 +579,6 @@ class HardwareTestHarness(Controller): > tests = self.certification.getDeviceTests(self.options, tests) > > if len(tests) > 0: >- if not self.__checkResultsSize(): >- return False > tests = self.addMandatoryTests(tests) > if not tests: > return False >@@ -621,16 +622,19 @@ class HardwareTestHarness(Controller): > return self.verify(self.certification.getTests()) > > def __checkResultsSize(self): >+ self.load() >+ if not self.certification: >+ return True > > if self.certification.getLoadedFileSize() < self.environment.getResultsWarningSize(): > return True > > # otherwise > print "Warning: the test results may be too large to submit to the hardware catalog." >- print "File: %s is %u MB" % (self.certification.getLoadedFilePath(), int(self.certification.getLoadedFileSize()/1048576)) >- if self.options.mode != Constants.auto and self.ui.promptConfirm("Would you like to package the current results first?"): >- self.doSubmit() >- return False >+ print "File: %s is %u MB" % (self.certification.getLoadedFilePath(), int(self.certification.getLoadedFileSize()/Constants.MB)) >+ if self.options.mode != Constants.auto and self.ui.promptConfirm("Would you like to save the current results first?"): >+ HardwareTestHarness.doSave(self) # call HardwareTestHarness.doSave as it just saves the current file without the selection dialog >+ self.clean() > > # size warning was ignored (or mode auto) > return True >@@ -772,7 +776,7 @@ class HardwareTestHarness(Controller): > return False > > >- if self.ui.promptConfirm("Are you sure you want to delete all test results?"): >+ if self.ui.promptConfirm("Are you sure you want to delete all current test results?"): > self.clean() > if subcommand == Constants.all and self.ui.promptConfirm("Also remove certification data?"): > self.cleanAll() >@@ -1057,6 +1061,7 @@ class HardwareTestHarness(Controller): > if self.options.debug != Constants.off: > print "removing HwCert results..." > os.system("rm -f %s" % self.environment.getResultsPath()) >+ self.certification = None > > def cleanAll(self): > os.system("rm -f %s" % self.environment.getCertificationPath()) >-- >1.8.5.3 >
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 1075782
: 874071