r296 - in trunk/tests: . rteval
by David Sommerseth
Author: dsommers
Date: 2010-01-12 17:04:41 +0000 (Tue, 12 Jan 2010)
New Revision: 296
Added:
trunk/tests/rteval/
trunk/tests/rteval/v7_rteval.py
Log:
Added first cut of a v7 rteval test
Added: trunk/tests/rteval/v7_rteval.py
===================================================================
--- trunk/tests/rteval/v7_rteval.py (rev 0)
+++ trunk/tests/rteval/v7_rteval.py 2010-01-12 17:04:41 UTC (rev 296)
@@ -0,0 +1,78 @@
+#!/usr/bin/python
+# Copyright (c) 2009 Red Hat, Inc. All rights reserved. This copyrighted material
+# is made available to anyone wishing to use, modify, copy, or
+# redistribute it subject to the terms and conditions of the GNU General
+# Public License v.2.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: David Sommerseth <davids(a)redhat.com>
+#
+
+import os, sys, string, time
+
+if __name__ == "__main__":
+ sys.path.insert(0, '/usr/share/v7/lib')
+
+from v7.test import Test
+from v7.tags import Constants
+
+class v7RTeval(Test):
+
+ def __init__(self):
+ Test.__init__(self, name="rteval")
+ self.interactive = False
+ self.data = {}
+ self.rteval = None
+
+
+ def __read_sys_dmi(self, name):
+ try:
+ f = open("/sys/class/dmi/id/%s" % name, "r")
+ ret = f.readline().strip()
+ f.close()
+ return ret
+ except IOError:
+ print "Could not open /sys/class/dmi/id/%s ... are you running the right kernel?" % name
+ return None
+
+
+ def plan(self, devices):
+ # Check if we have some interesting data from the /sys/class/dmi/id directory
+ self.data['sysdmi'] = {}
+ files = ('sys_vendor','product_name','product_version')
+ for f in files:
+ self.data['sysdmi'][f] = self.__read_sys_dmi(f)
+ if self.data['sysdmi'][f] is None:
+ # If one of the /sys/class/dmi/id files is missing, abort this test planning
+ return ()
+
+ # Prepare rteval
+ import rteval.rteval
+
+ args = ['-d', '30s']
+ self.rteval = rteval.rteval.RtEval(args)
+ return (self.makeCopy())
+
+
+ def run(self):
+ FAILED = 1
+ PASSED = 0
+
+ if self.rteval.rteval() == 0:
+ return PASSED
+ return FAILED
+
+
+if __name__ == "__main__":
+ test = v7RTeval()
+ test.plan(None)
+ returnValue = test.do(sys.argv)
+ sys.exit(returnValue)
+
Property changes on: trunk/tests/rteval/v7_rteval.py
___________________________________________________________________
Name: svn:executable
+ *
14 years, 4 months
r295 - trunk
by David Sommerseth
Author: dsommers
Date: 2010-01-12 17:04:34 +0000 (Tue, 12 Jan 2010)
New Revision: 295
Modified:
trunk/Makefile
Log:
Reworked rpm and srpm Makefile targets - do all work inside $(cwd)/rpm/
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-01-12 17:04:26 UTC (rev 294)
+++ trunk/Makefile 2010-01-12 17:04:34 UTC (rev 295)
@@ -24,6 +24,8 @@
HERE=$(shell pwd)
+HERE=$(shell pwd)
+
.PHONY: clean install
SUBDIRS := test-env v7 tests docs
@@ -48,6 +50,7 @@
mkdir -p $(DESTDIR)/var/v7
mkdir -p $(DESTDIR)/var/v7/docs
for i in $(SUBDIRS); do $(MAKE) -C $$i DESTDIR=$(DESTDIR) V7_VERSION=$(V7_VERSION) V7_RELEASE=$(V7_RELEASE) V7_RHEL_VERSION=$(V7_RHEL_VERSION) install; done
+ for i in $(SUBDIRS); do $(MAKE) -C $$i DESTDIR=$(DESTDIR) V7_VERSION=$(V7_VERSION) V7_RELEASE=$(V7_RELEASE) install; done
clean:
$(MAKE) -C tests clean
14 years, 4 months
r294 - trunk
by David Sommerseth
Author: dsommers
Date: 2010-01-12 17:04:26 +0000 (Tue, 12 Jan 2010)
New Revision: 294
Modified:
trunk/Makefile
Log:
Reworked rpm and srpm Makefile targets - do all work inside $(cwd)/rpm/
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-01-12 17:04:19 UTC (rev 293)
+++ trunk/Makefile 2010-01-12 17:04:26 UTC (rev 294)
@@ -22,6 +22,8 @@
HERE=$(shell pwd)
+HERE=$(shell pwd)
+
.PHONY: clean install
SUBDIRS := test-env v7 tests docs
14 years, 4 months
r293 - trunk
by David Sommerseth
Author: dsommers
Date: 2010-01-12 17:04:19 +0000 (Tue, 12 Jan 2010)
New Revision: 293
Modified:
trunk/Makefile
Log:
Reworked rpm and srpm Makefile targets - do all work inside $(cwd)/rpm/
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2010-01-12 16:50:58 UTC (rev 292)
+++ trunk/Makefile 2010-01-12 17:04:19 UTC (rev 293)
@@ -20,6 +20,8 @@
V7_SVN_MODULE := svn+ssh://svn.fedorahosted.org/svn/v7
V7_RHEL_VERSION := 5
+HERE=$(shell pwd)
+
.PHONY: clean install
SUBDIRS := test-env v7 tests docs
@@ -31,7 +33,7 @@
tag: mark-version
svn copy . $(V7_SVN_MODULE)/tags/`echo "v7-V$(V7_VERSION)R$(V7_RELEASE)" | sed "/\./s//-/"` -m "tag version"
-
+
mark-version:
@echo " " > $(V7_VERSION_PY)
@echo "# $(V7_VERSION_PY) is automatically-generated - DO NOT EDIT" >> $(V7_VERSION_PY)
@@ -44,7 +46,7 @@
mkdir -p $(DESTDIR)/var/v7
mkdir -p $(DESTDIR)/var/v7/docs
for i in $(SUBDIRS); do $(MAKE) -C $$i DESTDIR=$(DESTDIR) V7_VERSION=$(V7_VERSION) V7_RELEASE=$(V7_RELEASE) V7_RHEL_VERSION=$(V7_RHEL_VERSION) install; done
-
+
clean:
$(MAKE) -C tests clean
$(MAKE) -C v7 clean
@@ -59,8 +61,8 @@
v7-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2: /tmp/v7/exclude v7.spec
tar cjS -f $@ -X /tmp/v7/exclude --exclude $@ *
-
+
/tmp/v7/exclude:
mkdir -p /tmp/v7
echo "CVS" > $@
@@ -74,11 +76,15 @@
v7.spec: v7.spec.in Makefile
cat $< | sed -e 's/@V7_VERSION@/$(V7_VERSION)/g' -e 's/@V7_RELEASE@/$(V7_RELEASE)/g' -e 's/@V7_RHEL_VERSION@/$(V7_RHEL_VERSION)/g'> $@
+rpm-prep: v7-$(V7_VERSION_RELEASE).tar.bz2 v7.spec
+ rm -rf rpm
+ mkdir -p rpm/{BUILD,RPMS,SRPMS,SOURCES,SPECS}
+ cp v7-$(V7_VERSION_RELEASE).tar.bz2 rpm/SOURCES/
+ cp v7.spec rpm/SPECS
-srpm: package
- rpmbuild -ts v7-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2
+srpm: rpm-prep
+ rpmbuild --define "_topdir $(HERE)/rpm" -bs rpm/SPECS/v7.spec
-rpm: package
- rpmbuild -tb v7-$(V7_VERSION_RELEASE).el$(V7_RHEL_VERSION).tar.bz2
+rpm: rpm-prep
+ rpmbuild --define "_topdir $(HERE)/rpm" -ba rpm/SPECS/v7.spec
-
14 years, 4 months
r292 - in tags: . v7-V1-0R22/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-01-12 16:50:58 +0000 (Tue, 12 Jan 2010)
New Revision: 292
Added:
tags/v7-V1-0R22/
Modified:
tags/v7-V1-0R22/v7/version.py
Log:
tag version
Copied: tags/v7-V1-0R22 (from rev 291, trunk)
Modified: tags/v7-V1-0R22/v7/version.py
===================================================================
--- trunk/v7/version.py 2010-01-12 16:45:24 UTC (rev 291)
+++ tags/v7-V1-0R22/v7/version.py 2010-01-12 16:50:58 UTC (rev 292)
@@ -1,4 +1,5 @@
# v7/version.py is automatically-generated - DO NOT EDIT
version = '1.0'
-release = '20'
+release = '22'
+rhel_version = '5'
14 years, 4 months
r291 - trunk/tests/cpuscaling
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-01-12 16:45:24 +0000 (Tue, 12 Jan 2010)
New Revision: 291
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
474856 - CPUScaling Fails in HTS 5.3-3.
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2010-01-12 16:35:52 UTC (rev 290)
+++ trunk/tests/cpuscaling/cpuscaling.py 2010-01-12 16:45:24 UTC (rev 291)
@@ -357,7 +357,7 @@
# run to verify the base line execution time, bail if self.retryTolerance margin cannot be acheived in self.retryLimit runs.
self.minimumFrequencyTestTime = self.runLoadTest()
if not self.minimumFrequencyTestTime:
- success = False
+ return False
print "Minumum frequency load test time: %.2f" % self.minimumFrequencyTestTime
# 11. Set the cpu speed to it's highest value as above.
@@ -375,7 +375,7 @@
# 12. Repeat workload test, record timing
self.maximumFrequencyTestTime = self.runLoadTest()
if not self.maximumFrequencyTestTime:
- success = False
+ return False
print "Maximum frequency load test time: %.2f" % self.maximumFrequencyTestTime
# 13. Verify MHz increase is comparable to time % decrease( eg. slow MHz/fast MHz ~= fast time/slow time;
@@ -424,7 +424,7 @@
# 17. Repeat workload test, record timing; also during testing verify the ~scaling_cur_freq reaches ~scaling_max_freq
self.onDemandTestTime = self.runLoadTest()
if not self.onDemandTestTime:
- success = False
+ return False
print "On Demand load test time: %.2f" % self.onDemandTestTime
# 18. Compare the timing to the max results from earlier, again time should be within self.speedUpTolerance
@@ -462,7 +462,7 @@
currentFrequency = self.getParameter("scaling_cur_freq")
if not maximumFrequency or not currentFrequency or (maximumFrequency != currentFrequency):
print "Error: Current cpu frequency of %.2f is not set to the maximum value of %.2f" % (currentFrequency, maximumFrequency)
- success = False
+ return False
# 22. Repeat workload test, record timing, also verify frequency does not drop during run
self.performanceTestTime = self.runLoadTest()
14 years, 4 months
r290 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-01-12 16:35:52 +0000 (Tue, 12 Jan 2010)
New Revision: 290
Modified:
trunk/v7/test.py
Log:
fix getDeviceClass
Modified: trunk/v7/test.py
===================================================================
--- trunk/v7/test.py 2010-01-12 16:32:44 UTC (rev 289)
+++ trunk/v7/test.py 2010-01-12 16:35:52 UTC (rev 290)
@@ -130,10 +130,7 @@
if self.serverMode: return Constants.yes
return Constants.no
def getDeviceClass(self):
- if self.deviceClass:
- return self.deviceClass
- else:
- return self.name()
+ return self.deviceClass
def getDeviceBus(self):
if self.device:
return self.device.getPropertyString("bus")
14 years, 4 months
r289 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-01-12 16:32:44 +0000 (Tue, 12 Jan 2010)
New Revision: 289
Added:
trunk/v7/hash.py
Modified:
trunk/v7/report.py
Log:
484657 - hts uses code deprecated in python 2.6
Added: trunk/v7/hash.py
===================================================================
--- trunk/v7/hash.py (rev 0)
+++ trunk/v7/hash.py 2010-01-12 16:32:44 UTC (rev 289)
@@ -0,0 +1,45 @@
+# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted material
+# is made available to anyone wishing to use, modify, copy, or
+# redistribute it subject to the terms and conditions of the GNU General
+# Public License v.2.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Author: Greg Nichols
+#
+# The Report object packages and/or presents test results in text, rpm, or html form.
+#
+
+hashModule = None
+try:
+ import hashlib
+ hashModule = hashlib
+except:
+ pass
+
+if not hashModule:
+ try:
+ import md5
+ hashModule = md5
+ except:
+ print "Error: could not find hash library"
+
+if __name__ == "__main__":
+ print hashModule
+ content = "Boo"
+ m=hashModule.md5()
+ m.update(content)
+ print content
+
+
+
+
+
+
+
Modified: trunk/v7/report.py
===================================================================
--- trunk/v7/report.py 2010-01-12 16:16:23 UTC (rev 288)
+++ trunk/v7/report.py 2010-01-12 16:32:44 UTC (rev 289)
@@ -16,12 +16,13 @@
# The Report object packages and/or presents test results in text, rpm, or html form.
#
-import os,sys,shutil, hashlib, codecs
+import os,sys,shutil, codecs
import string
from v7.tags import Constants, Tags
from v7.controller import Controller
from v7.command import Command, V7CommandException
+from v7.hash import hashModule
class Report(Controller):
@@ -410,7 +411,7 @@
returnValue = 0
for line in log:
contents += line
- m=hashlib.md5()
+ m=hashModule.md5()
m.update(contents)
sum=int(m.hexdigest(),16)
# YK: write the decimal format result to output.log, not hex
14 years, 4 months
r288 - trunk/tools
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-01-12 16:16:23 +0000 (Tue, 12 Jan 2010)
New Revision: 288
Modified:
trunk/tools/v7-release.py
Log:
fix
Modified: trunk/tools/v7-release.py
===================================================================
--- trunk/tools/v7-release.py 2010-01-12 16:14:46 UTC (rev 287)
+++ trunk/tools/v7-release.py 2010-01-12 16:16:23 UTC (rev 288)
@@ -26,12 +26,15 @@
sourceTar = "%s/v7-%s-%s.el%s.tar.bz2" % (buildDir, v7.version.version, v7.version.release, v7.version.rhel_version)
-print "building for RHEL %u" % v7.version.rhel_version
+print "building for RHEL %s" % v7.version.rhel_version
-distSubdir = "RHEL-%u-HWCert" % v7.version.rhel_version
+distSubdir = "RHEL-%s-HWCert" % v7.version.rhel_version
distVersionDir = "%s/%s" % (distDir, distSubdir)
os.chdir(distVersionDir)
+#copy the spec file
+shutil.copy(os.path.join(buildDir, "v7.spec"), "v7.spec")
+
# upload the tarball
command = "make upload FILES=%s" % sourceTar
print command
@@ -46,7 +49,12 @@
os.system(command)
# build it
-command = "make build COLLECTION=hwcert-%uE" % v7.version.rhel_version
+if v7.version.rhel_version == "6":
+ tag = "HWCert-RHEL-6"
+else:
+ tag = "hwcert-%sE" % v7.version.rhel_version
+
+command = "make build COLLECTION=%s" % tag
print command
os.system(command)
14 years, 4 months
r287 - trunk/v7
by gnichols@fedoraproject.org
Author: gnichols
Date: 2010-01-12 16:14:46 +0000 (Tue, 12 Jan 2010)
New Revision: 287
Modified:
trunk/v7/command.py
Log:
488145 - FEAT: HTS should provide a run-time dependency option for installation
Modified: trunk/v7/command.py
===================================================================
--- trunk/v7/command.py 2010-01-12 16:14:15 UTC (rev 286)
+++ trunk/v7/command.py 2010-01-12 16:14:46 UTC (rev 287)
@@ -48,21 +48,12 @@
(output, errors) = self.pipe.communicate()
if output:
self.output = output.splitlines()
- # make the last line has the new line at the end
- if self.output[-1][-1:] != '\n':
- self.output[-1] = self.output[-1] + '\n'
if errors:
self.errors = errors.splitlines()
- # make the last line has the new line at the end
- if self.errors[-1][-1:] != '\n':
- self.errors[-1] = self.output[-1] + '\n'
self.returnValue = (self.pipe.returncode >> 8) & 0xFF
self.signal = self.pipe.returncode & 0xFF
- if self.errors:
- for line in self.errors:
- sys.stderr.write( line )
- sys.stderr.flush()
+ self.printErrors()
def _checkErrors(self):
@@ -101,12 +92,14 @@
if self.output:
for line in self.output:
sys.stdout.write( line )
+ sys.stdout.write("\n")
sys.stdout.flush()
def printErrors(self):
if self.errors:
for line in self.errors:
sys.stderr.write( line )
+ sys.stderr.write("\n")
sys.stderr.flush()
14 years, 4 months