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 314718 Details for
Bug 459721
FEAT: save command for saving test 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 for hts/hardwardwaretest.py
hardwaretest.patch (text/plain), 4.14 KB, created by
Greg Nichols
on 2008-08-21 15:48:23 UTC
(
hide
)
Description:
patch for hts/hardwardwaretest.py
Filename:
MIME Type:
Creator:
Greg Nichols
Created:
2008-08-21 15:48:23 UTC
Size:
4.14 KB
patch
obsolete
>Index: hardwaretest.py >=================================================================== >RCS file: /cvs/qa/hts/hts/hardwaretest.py,v >retrieving revision 1.83 >diff -u -r1.83 hardwaretest.py >--- hardwaretest.py 17 Jul 2008 00:30:57 -0000 1.83 >+++ hardwaretest.py 21 Aug 2008 15:42:16 -0000 >@@ -22,7 +22,7 @@ > import md5 > import time > import copy >-import urllib2, re >+import socket > from dbus import dbus_bindings > from optparse import OptionParser > >@@ -48,6 +48,7 @@ > Controller.__init__(self) > self.getOptions() > self.dataDirectory = self.options.data >+ self.dataStoreDirectory = "%s/store" % self.options.data > self.testDirectory = self.options.source > self.configFile = "%s/%s" % (self.options.data, self.options.cfg) > self.planFile = "%s/%s" % (self.options.data, self.options.plan) >@@ -62,6 +63,7 @@ > self.runMode = self.options.mode > self.htsClassLibraryPath = "/usr/share/hts/lib" > self.lockFile = "/var/lock/subsys/hts" >+ self.commands = "discover", "plan", "run", "print", "submit", "certify", "server", "test", "version", "clean", "save" > > def getOptions(self): > usage = "usage: %prog <command> [options]\n\ncommand:\n"\ >@@ -150,7 +152,7 @@ > command = None > if self.args: > command=self.args[0] >- if not command in ("discover", "plan", "run", "print", "submit", "certify", "server", "test", "version", "clean"): >+ if not command in self.commands: > self.optionParser.error( "Unknown command \"%s\"" % command) > sys.exit(1) > if command in "server" and len(self.args) > 1 and not self.args[1] in ("start", "stop", "status"): >@@ -175,7 +177,9 @@ > elif (command == 'aggregate'): > result = self.doAggregateVirt() > elif (command == 'print'): >- result = self.doPrint() >+ result = self.doPrint() >+ elif (command == 'save'): >+ result = self.doSave() > elif (command == 'submit'): > result = self.doSubmit() > elif (command == 'run'): >@@ -257,6 +261,9 @@ > print "Error: could not determine OS release number" > return False > print "OS: %s %s" % (self.certification.getOS(Tags.name), self.certification.getOS(Tags.release)) >+ hostname = socket.gethostname() >+ if hostname: >+ self.certification.setOS(Tags.hostname, hostname) > self.certification.setDiscoverTime(self.getCurrentUTCTime()) > self.certification.save(self.configFile) > print "saved configuration to %s" % self.configFile >@@ -581,6 +588,39 @@ > #otherwise > print "Error: no test results to submit" > return False >+ >+ def doSave(self): >+ self.load() >+ if self.results: >+ path = self.dataStoreDirectory >+ self.makeDirectoryPath(path) >+ for tag in Tags.vendor, Tags.model, Tags.arch: >+ value = self.results.getHardware(tag) >+ if len(value) > 0 and value != "unknown": >+ path += "/%s" % value >+ self.makeDirectoryPath(path) >+ for tag in Tags.name, Tags.release: >+ value = self.results.getOS(tag) >+ if len(value) > 0: >+ path += "/%s" % value >+ self.makeDirectoryPath(path) >+ >+ savedFilename = "hts-results" >+ hostname = self.results.getOS(Tags.hostname) >+ if hostname: >+ savedFilename += "-%s" % hostname >+ runTime = self.results.getRunTime() >+ if runTime: >+ savedFilename += "-%s" % self.results.timeStringToTimestamp(runTime) >+ savedFilename += ".xml" >+ print "Saving current results to:" >+ print "%s/%s" % (path, savedFilename) >+ self.certification.save("%s/%s" % (path, savedFilename)) >+ return True >+ >+ #otherwise >+ print "Error: no test results to save" >+ return False > > def doClean(self): > if self.ui.promptConfirm("Are you sure you want to delete all test results?"):
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 459721
: 314718 |
314719
|
314720