Author: gnichols
Date: 2011-01-27 14:26:10 +0000 (Thu, 27 Jan 2011)
New Revision: 737
Modified:
trunk/tests/cpuscaling/cpuscaling.py
Log:
488129 - FEAT: hts plan --add command needs to provide test-specific guidance
Modified: trunk/tests/cpuscaling/cpuscaling.py
===================================================================
--- trunk/tests/cpuscaling/cpuscaling.py 2011-01-27 14:23:46 UTC (rev 736)
+++ trunk/tests/cpuscaling/cpuscaling.py 2011-01-27 14:26:10 UTC (rev 737)
@@ -84,6 +84,31 @@
return tests
+ def verify(self):
+ if not self.getLogicalDeviceName():
+ while True:
+ cpuNumber = self.prompt("Please enter the cpu number to be
tested:")
+ try:
+ int(cpuNumber)
+ self.setLogicalDeviceName(cpuNumber)
+ self.parameters.set(Constants.DEVICE, cpuNumber)
+ break
+ except ValueError:
+ print "Please enter just the integer cpu number."
+
+ # do a quick test to see if the cpu number is usable
+ cpuDirectories = self.getCPUFreqDirectories()
+ for directory in cpuDirectories:
+ if ("cpu" + self.getLogicalDeviceName()) in directory:
+ return True
+ # otherwise
+ print "Error: there is no cpufreq directory for cpu" +
self.getLogicalDeviceName()
+ return False
+
+
+
+
+
def getCPUFreqDirectories(self):
if not os.path.exists(self.sysCPUDirectory):
Show replies by date