r767 - in tags: . v7-V1-3R10/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:20:28 +0000 (Mon, 31 Jan 2011)
New Revision: 767
Added:
tags/v7-V1-3R10/
tags/v7-V1-3R10/v7/version.py
Log:
tag version
Copied: tags/v7-V1-3R10/v7/version.py (from rev 335, trunk/v7/version.py)
===================================================================
--- tags/v7-V1-3R10/v7/version.py (rev 0)
+++ tags/v7-V1-3R10/v7/version.py 2011-01-31 21:20:28 UTC (rev 767)
@@ -0,0 +1,5 @@
+
+# v7/version.py is automatically-generated - DO NOT EDIT
+version = '1.3'
+release = '10'
+rhel_version = '6'
13 years, 2 months
r766 - trunk
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:19:52 +0000 (Mon, 31 Jan 2011)
New Revision: 766
Modified:
trunk/v7.spec.in
Log:
changelog
Modified: trunk/v7.spec.in
===================================================================
--- trunk/v7.spec.in 2011-01-31 21:18:14 UTC (rev 765)
+++ trunk/v7.spec.in 2011-01-31 21:19:52 UTC (rev 766)
@@ -69,9 +69,9 @@
/etc/init.d/v7
%changelog
-* Fri Jan 28 2011 Greg Nichols <gnichols(a)redhat.com>
+* Mon Jan 31 2011 Greg Nichols <gnichols(a)redhat.com>
-V7 1.3 R9
+V7 1.3 R10
589739 - CPUSCALING test includes unprocessed tags around displayed text
13 years, 2 months
r765 - trunk/tests/info
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:18:14 +0000 (Mon, 31 Jan 2011)
New Revision: 765
Modified:
trunk/tests/info/info.py
Log:
589739 - CPUSCALING test includes unprocessed tags around displayed text
Modified: trunk/tests/info/info.py
===================================================================
--- trunk/tests/info/info.py 2011-01-31 21:17:05 UTC (rev 764)
+++ trunk/tests/info/info.py 2011-01-31 21:18:14 UTC (rev 765)
@@ -135,7 +135,6 @@
print "Error: Verification of v7 rpm failed"
# 451074: FEAT: save any modified test files
pyFilePattern= re.compile(".*\.py$")
- outputDirectory = os.path.dirname(self.outputFile)
found = False
for line in rpmVerify.output:
tokens = line.split()
@@ -146,7 +145,7 @@
found = True
print "Saving modified source files:"
print tokens[1]
- shutil.copy(tokens[1], outputDirectory)
+ shutil.copy(tokens[1], self.getOutputDirectory())
return verified
@@ -387,9 +386,8 @@
sys.stdout.flush()
if tarFile:
- outputDirectory = os.path.dirname(self.outputFile)
- shutil.copy(tarFile, outputDirectory)
- print "Copied %s %s to %s" % (reportCommand, tarFile, outputDirectory)
+ shutil.copy(tarFile, self.getOutputDirectory())
+ print "Copied %s %s to %s" % (reportCommand, tarFile, self.getOutputDirectory())
sys.stdout.flush()
result = True
break
13 years, 2 months
r764 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:17:05 +0000 (Mon, 31 Jan 2011)
New Revision: 764
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
589739 - CPUSCALING test includes unprocessed tags around displayed text
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-01-31 21:16:30 UTC (rev 763)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-01-31 21:17:05 UTC (rev 764)
@@ -37,7 +37,6 @@
self.retryLimit = 5
self.retryTolerance = 5.0 # percent
self.sysCPUDirectory = "/sys/devices/system/cpu"
- self.cpufreqDirectory = "%s/cpu%s/cpufreq" % (self.sysCPUDirectory, self.getLogicalDeviceName())
self.idaFlag = "ida"
self.idaSpeedupFactor = 8.0 # percent
self.selfTestData = [10.0, 10.0, 10.0, 10.0] # min, max, ondemand, performance
@@ -110,6 +109,7 @@
def getCPUFreqDirectories(self):
+ self.cpufreqDirectory = "%s/cpu%s/cpufreq" % (self.sysCPUDirectory, self.getLogicalDeviceName())
if not os.path.exists(self.sysCPUDirectory):
print "Error: no file %s" % self.sysCPUDirectory
13 years, 2 months
r763 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:16:30 +0000 (Mon, 31 Jan 2011)
New Revision: 763
Modified:
trunk/v7/testdocument.py
Log:
589739 - CPUSCALING test includes unprocessed tags around displayed text
Modified: trunk/v7/testdocument.py
===================================================================
--- trunk/v7/testdocument.py 2011-01-31 21:16:04 UTC (rev 762)
+++ trunk/v7/testdocument.py 2011-01-31 21:16:30 UTC (rev 763)
@@ -223,6 +223,12 @@
return self.mode
def setMode(self, mode):
self.mode = mode
+
+ def setParameters(self, testParameters):
+ map = [(Constants.DEVICE, self.setLogicalDeviceName), (Constants.UDI, self.setUDI)]
+ for (name, setFunction) in map:
+ if testParameters.get(name):
+ setFunction(testParameters.get(name))
13 years, 2 months
r762 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:16:04 +0000 (Mon, 31 Jan 2011)
New Revision: 762
Modified:
trunk/v7/hardwaretest.py
Log:
589739 - CPUSCALING test includes unprocessed tags around displayed text
Modified: trunk/v7/hardwaretest.py
===================================================================
--- trunk/v7/hardwaretest.py 2011-01-31 21:15:11 UTC (rev 761)
+++ trunk/v7/hardwaretest.py 2011-01-31 21:16:04 UTC (rev 762)
@@ -190,6 +190,7 @@
result = self.commands[self.command]()
except KeyError, e:
print "unknown command: " + self.command
+ print e
self.releaseLock()
return result
@@ -675,7 +676,7 @@
# create temp dir
tmpDirectory=tempfile.mkdtemp('',"v7-"+test.getName()+"-")
# put test files in temp dir
- if not self.installTest(self.environment.getSourceDirectory()+"/"+test.getName(), tmpDirectory):
+ if not self.installTest(os.path.join(self.environment.getSourceDirectory(), test.getName()), tmpDirectory):
return False
# Here goes! Actually run the test.
@@ -683,30 +684,29 @@
testError = False
# Walk the tmpdir and find any directory that contains a runtest.sh
returnValue = 1
- for directory in [i[0] for i in os.walk(tmpDirectory) if 'runtest.sh' in i[2]]:
+ try:
+ summary = Constants.FAIL
try:
- summary = Constants.FAIL
- try:
- returnValue = self.runTest(directory, test, run, outputFilePath)
- if returnValue is 0:
- summary = Constants.PASS
- except Exception, exception:
- print "Error: test raised exception:"
- print exception
- summary = Constants.ABORT
+ returnValue = self.runTest(tmpDirectory, test, run, outputFilePath)
+ if returnValue is 0:
+ summary = Constants.PASS
+ except Exception, exception:
+ print "Error: test raised exception:"
+ print exception
+ summary = Constants.ABORT
+
+ run.setSummary(summary)
+ run.getResultsAttachments(self.environment, outputFilePath)
+ self.certification.save(self.environment.getResultsPath())
+ print "saved to " + self.environment.getResultsPath()
+
+ if self.options.rhts:
+ self.reportToRHTS(test, run.getSummary(), outputFilePath)
- run.setSummary(summary)
- run.getResultsAttachments(self.environment, outputFilePath)
- self.certification.save(self.environment.getResultsPath())
- print "saved to " + self.environment.getResultsPath()
-
- if self.options.rhts:
- self.reportToRHTS(test, run.getSummary(), outputFilePath)
-
- except OSError, e:
- print "Test error: %s" % e
- syslog.syslog("Test error: %s" % e)
- testerror = True
+ except OSError, e:
+ print "Test error: %s" % e
+ syslog.syslog("Test error: %s" % e)
+ testerror = True
# Log the end of the test.
run.setEndTime(self.getCurrentUTCTime())
@@ -832,10 +832,12 @@
for testDocument in testDocuments:
test = self.planner.getTest(testDocument.getName())
- testParameters = self.getTestParameters()
- testParameters.set(Constants.DEVICE, testDocument.getLogicalDeviceName())
+ testParameters = TestParameters(testDocument, self)
test.setParameters(testParameters)
- if not test.verify():
+ if test.verify():
+ # allow test verify code to update test document
+ testDocument.setParameters(testParameters)
+ else:
failures += 1
if failures == 0:
@@ -995,6 +997,8 @@
def installTest(self, testDirectory,tmpDirectory):
"Install a test's files to the named tmpdir for running"
+ if self.Debugging != Constants.off:
+ print "installing test from %s into %s" % (testDirectory, tmpDirectory)
try:
cwd=os.getcwd()
os.chdir(testDirectory)
@@ -1033,10 +1037,11 @@
# find the test driver python and call it directly
test = self.planner.getTest(testDocument.getName())
- testParameters = self.getTestParameters()
- testParameters.set(Constants.DEVICE, testDocument.getLogicalDeviceName())
+ testParameters = TestParameters(testDocument, self)
testParameters.set(Constants.OUTPUTFILE, outputFilePath)
test.setParameters(testParameters)
+ if self.Debugging != Constants.off:
+ print "Test Parameters: %s" % testParameters
rv = test.run()
# restore stdout and stdin, and cwd
@@ -1248,24 +1253,5 @@
value = self.ui.prompt("Please enter the %s:" % tag, answers)
if len(value) > 0:
self.certification.setHardware(tag, value)
-
- def getTestParameters(self):
- parameters = TestParameters()
- # determine test server
- if self.testServer:
- self.certification.setTestServer(self.testServer)
- else:
- if self.certification.getTestServer():
- self.testServer = self.certification.getTestServer()
- parameters.set(Constants.TESTSERVER, self.testServer)
-
- parameters.set(Constants.DEBUG, self.options.debug)
-
- parameters.set(Constants.RUNMODE, self.options.mode)
-
- if self.command == "continue":
- runCommand = runCommand + "%s=%s " % (Constants.INCOMPLETE, "1")
-
- return parameters
13 years, 2 months
r761 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:15:11 +0000 (Mon, 31 Jan 2011)
New Revision: 761
Modified:
trunk/v7/test.py
Log:
589739 - CPUSCALING test includes unprocessed tags around displayed text
Modified: trunk/v7/test.py
===================================================================
--- trunk/v7/test.py 2011-01-31 21:14:18 UTC (rev 760)
+++ trunk/v7/test.py 2011-01-31 21:15:11 UTC (rev 761)
@@ -41,7 +41,7 @@
self.runOn = ""
self.requires = ""
self.priority = 999
- self.planUDI = ""
+ self.udi = ""
self.planDeviceLabel = ""
self.serverMode = False
self.deviceClass = None
@@ -50,10 +50,17 @@
self.source = None # either hal, kudzu, or manual
self.marking = False # is <output> sub-section currently active?
- self.parameters = TestParameters()
+
+ def setParameters(self, testParameters):
+ self.parameters = testParameters
self.__initTestParameters()
def __initTestParameters(self):
+
+ try:
+ self.debug = self.parameters.get(Constants.DEBUG)
+ except KeyError:
+ self.debug = Constants.off
try:
self.outputFile = self.parameters.get(Constants.OUTPUTFILE)
@@ -85,10 +92,7 @@
except KeyError:
self.incomplete = False
- try:
- self.debug = self.parameters.get(Constants.DEBUG)
- except KeyError:
- self.debug = Constants.off
+
def __cmp__(self, other):
if TestTag.interactive in self.tags() and not TestTag.interactive in other.tags():
@@ -183,8 +187,10 @@
def getOutputFile(self):
return self.outputFile
+ def getOutputDirectory(self):
+ return os.path.dirname(self.getOutputFile())
+
def getUDI(self):
- if self.planUDI: return self.planUDI
if self.device: return self.device.getUDI()
if self.udi: return self.udi
# otherwise
@@ -525,16 +531,37 @@
class TestParameters:
- def __init__(self):
+ def __init__(self, testDocument, hardwareTest):
self.parameters = dict()
+ self.testDocument = testDocument
- # try and get them from the environment
+ # 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:
try:
self.parameters[name] = os.environ[name]
except KeyError:
pass
+
+ # 2 get them from the harness/options
+ if hardwareTest.testServer:
+ self.parameters[Constants.TESTSERVER] = hardwareTest.testServer
+ elif hardwareTest.certification and hardwareTest.certification.getTestServer():
+ self.parameters[Constants.TESTSERVER] = hardwareTest.certification.getTestServer()
+
+ self.parameters[Constants.DEBUG] = hardwareTest.options.debug
+ self.parameters[Constants.RUNMODE] = hardwareTest.options.mode
+
+ if hardwareTest.command == "continue":
+ self.parameters[Constants.INCOMPLETE] = "1"
+
+
+ # 2) try and get them from the testDocument
+ self.testDocument = testDocument
+ map = [(Constants.DEVICE, testDocument.getLogicalDeviceName)]
+ for (name, function) in map:
+ self.parameters[name] = function()
+
def __str__(self):
str = ""
for (key, value) in self.parameters.iteritems():
@@ -542,10 +569,15 @@
return str
def get(self, name):
- return self.parameters[name]
+ try:
+ return self.parameters[name]
+ except KeyError:
+ return None
def set(self, name, value):
self.parameters[name] = value
+
+
13 years, 2 months
r760 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:14:18 +0000 (Mon, 31 Jan 2011)
New Revision: 760
Modified:
trunk/v7/rundocument.py
Log:
589739 - CPUSCALING test includes unprocessed tags around displayed text
Modified: trunk/v7/rundocument.py
===================================================================
--- trunk/v7/rundocument.py 2011-01-31 21:13:38 UTC (rev 759)
+++ trunk/v7/rundocument.py 2011-01-31 21:14:18 UTC (rev 760)
@@ -234,7 +234,7 @@
fileParts = file.split(".")
filePath = os.path.join(testOutputDir, file)
# attach any file not part of the test
- if (not os.path.isdir(filePath) and file not in ["output.log", "Makefile"]):
+ if (not os.path.isdir(filePath) and file not in ["output.log", environment.getResultsFileName()]):
# limit file size of attachments
if os.path.getsize(filePath) > environment.getMaximumAttachmentSize():
print "Warning: %s size: %u is too big to attach to the results." % (file, os.path.getsize(filePath))
13 years, 2 months
r759 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:13:38 +0000 (Mon, 31 Jan 2011)
New Revision: 759
Modified:
trunk/v7/fvtest.py
Log:
589739 - CPUSCALING test includes unprocessed tags around displayed text
Modified: trunk/v7/fvtest.py
===================================================================
--- trunk/v7/fvtest.py 2011-01-31 21:12:37 UTC (rev 758)
+++ trunk/v7/fvtest.py 2011-01-31 21:13:38 UTC (rev 759)
@@ -475,7 +475,7 @@
result = True
try:
self.mountDataImage()
- Command("cp /mnt/" + self.environment.getResultsFileName() + " .").echo()
+ Command("cp /mnt/%s %s" % (self.environment.getResultsFileName(), self.getOutputDirectory())).echo()
# merge the results
result = self.getGuestTestRunResult()
except V7CommandException, e:
@@ -494,7 +494,7 @@
def getGuestTestRunResult(self):
# open the test results, and look for the run
results = CertificationDocument()
- results.load(self.environment.getResultsFileName())
+ results.load(os.path.join(self.getOutputDirectory(), self.environment.getResultsFileName()))
test = results.getTest(self.testToRun)
if not test:
print "Error: no test " + self.testToRun + " in guest results"
13 years, 2 months
r758 - trunk/test-env/lib
by gnichols@fedoraproject.org
Author: gnichols
Date: 2011-01-31 21:12:37 +0000 (Mon, 31 Jan 2011)
New Revision: 758
Modified:
trunk/test-env/lib/v7-make.include
Log:
589739 - CPUSCALING test includes unprocessed tags around displayed text
Modified: trunk/test-env/lib/v7-make.include
===================================================================
--- trunk/test-env/lib/v7-make.include 2011-01-31 21:11:32 UTC (rev 757)
+++ trunk/test-env/lib/v7-make.include 2011-01-31 21:12:37 UTC (rev 758)
@@ -20,14 +20,8 @@
# hardware certification test suite.
#
-# Common Variables.
-TEST_DIR=/mnt/tests$(TEST)
-INSTALL_DIR=$(DEST)$(TEST_DIR)
-
-# tag, release, prep, package, submit: Not relevant to HTS
-
install: $(FILES)
- mkdir -p $(INSTALL_DIR)
- cp -a $(FILES) Makefile $(INSTALL_DIR)
+ mkdir -p $(DEST)
+ cp -a $(FILES) Makefile $(DEST)
13 years, 2 months