Author: gnichols Date: 2011-07-12 10:42:29 +0000 (Tue, 12 Jul 2011) New Revision: 995
Modified: trunk/tests/audio/audio.py trunk/tests/battery/battery.py trunk/tests/bluray/bluray.py trunk/tests/cdrom/cdrom.py trunk/tests/dvd/dvd.py trunk/tests/expresscard/expresscard.py trunk/tests/floppy/floppy.py trunk/tests/lid/lid.py trunk/tests/pccard/pccard.py trunk/tests/suspend/suspend.py trunk/tests/tape/tape.py trunk/tests/usb/usb.py Log: 705844 - interactive tests run in --mode auto should fail
Modified: trunk/tests/audio/audio.py =================================================================== --- trunk/tests/audio/audio.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/audio/audio.py 2011-07-12 10:42:29 UTC (rev 995) @@ -69,16 +69,18 @@
self.logSoundCardInfo()
- if self.getMode() != Constants.normal: - print("Test Mode: %s, Audio NOT VERIFIED BY TESTER!" % self.getMode()) - else: - print "This test plays a sound sample and records it to another file." - print "Please use the Volume Control application and insure that the " - print "Capture settings will record the sound." - if not self.promptConfirm("Continue?"): - self.result = Constants.FAIL - return FAILED + if self.getMode() == Constants.auto: + print("Error: Test Mode: %s: The audio test can not be run in auto mode since audio functions must be verified by the tester." % self.getMode()) + return FAILED
+ # otherwise + print "This test plays a sound sample and records it to another file." + print "Please use the Volume Control application and insure that the " + print "Capture settings will record the sound." + if not self.promptConfirm("Continue?"): + self.result = Constants.FAIL + return FAILED + waveFiles=["/usr/share/system-config-soundcard/sound-sample.wav", "/usr/share/sounds/alsa/Front_Right.wav", "/usr/share/sounds/alsa/Front_Left.wav"] @@ -101,7 +103,7 @@ time.sleep(waitTime) os.system("killall -w -9 rec sox")
- if self.getMode() == Constants.normal and not self.promptConfirm("Did you hear the sound?"): + if not self.promptConfirm("Did you hear the sound?"): self.result = Constants.FAIL return FAILED
@@ -111,7 +113,7 @@ self.result = Constants.FAIL return FAILED
- if self.getMode() == Constants.normal and not self.promptConfirm("Did you hear the sound?"): + if not self.promptConfirm("Did you hear the sound?"): self.result = Constants.FAIL return FAILED
Modified: trunk/tests/battery/battery.py =================================================================== --- trunk/tests/battery/battery.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/battery/battery.py 2011-07-12 10:42:29 UTC (rev 995) @@ -147,6 +147,11 @@ def run(self): FAILED = 1 PASSED = 0 + + if self.getMode() == Constants.auto: + print "Error: battery test can not be run in auto mode, as it requires the tester to disconnect power" + return FAILED + action = None testedConnected = False testedDisconnected = False
Modified: trunk/tests/bluray/bluray.py =================================================================== --- trunk/tests/bluray/bluray.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/bluray/bluray.py 2011-07-12 10:42:29 UTC (rev 995) @@ -130,10 +130,10 @@ if not self.initializeDeviceInfo(): return FAILED
- # auto or self-test mode ? - if self.getMode() != Constants.normal: - print "Warning: Auto test mode - TEST WILL NOT RUN" - return PASSED + # auto mode ? + if self.getMode() == Constants.auto: + print "Error: The bluray test can not be run in auto mode." + return FAILED
# if we have a UDI, maybe HAL worked? media = None
Modified: trunk/tests/cdrom/cdrom.py =================================================================== --- trunk/tests/cdrom/cdrom.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/cdrom/cdrom.py 2011-07-12 10:42:29 UTC (rev 995) @@ -125,9 +125,9 @@ return FAILED
# if auto or self-test mode - if self.getMode() != Constants.normal: - print "Warning: Auto test mode - TESTS NOT RUN" - return PASSED + if self.getMode() == Constants.auto: + print "Error: the CDROM test can not be run in auto mode" + return FAILED
print "Your device /dev/%s supports %s " % (self.getLogicalDeviceName(), self.showSupportedMedia()) if self.promptConfirm( "Would you like to test %s media?" % self.printMediaName(self.supportedMedia[0])):
Modified: trunk/tests/dvd/dvd.py =================================================================== --- trunk/tests/dvd/dvd.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/dvd/dvd.py 2011-07-12 10:42:29 UTC (rev 995) @@ -144,8 +144,8 @@
# if auto or self-test mode if self.getMode() != Constants.normal: - print "Warning: Auto test mode - TESTS NOT RUN" - return 0 + print "Error: The DVD test can not be run in auto mode." + return FAILED
self.getMediaChoice()
Modified: trunk/tests/expresscard/expresscard.py =================================================================== --- trunk/tests/expresscard/expresscard.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/expresscard/expresscard.py 2011-07-12 10:42:29 UTC (rev 995) @@ -155,6 +155,10 @@ def run(self): PASSED = 0 FAILED = 1 + + if self.getMode() == Constants.auto: + print "Error: the expresscard test can not be run in auto mode." + return FAILED
print "" print "ExpressCard Test:"
Modified: trunk/tests/floppy/floppy.py =================================================================== --- trunk/tests/floppy/floppy.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/floppy/floppy.py 2011-07-12 10:42:29 UTC (rev 995) @@ -83,9 +83,9 @@ # start testing (noFloppyDisk,junkOutput1) = commands.getstatusoutput("dd bs=1c if=%s count=0 2>/dev/null" % floppyDevice) if noFloppyDisk != 0: - if self.getMode() != Constants.normal: - print "Warning: Auto test mode - TESTS NOT RUN" - return 0 + if self.getMode() == Constants.auto: + print "Error: the floppy test can not be run in auto mode." + return 1 # otherwise os.system("clear") print " "
Modified: trunk/tests/lid/lid.py =================================================================== --- trunk/tests/lid/lid.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/lid/lid.py 2011-07-12 10:42:29 UTC (rev 995) @@ -59,6 +59,10 @@ SLEEPLIMIT=20 # sleep cycles SLEEPTIME=0.5 # sec
+ if self.getMode() == Constants.auto: + print "Error: the lid test can not be run in auto mode." + return FAILED + if not self.checkLid(checkForOpen=True): print "Error: lid must be open for this test" return FAILED
Modified: trunk/tests/pccard/pccard.py =================================================================== --- trunk/tests/pccard/pccard.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/pccard/pccard.py 2011-07-12 10:42:29 UTC (rev 995) @@ -25,7 +25,10 @@ Test.__init__(self, name="pccard") self.deviceClass = DeviceClass.pccard
+ def tags(self): + return [TestTag.noninteractive, TestTag.certification]
+ def plan(self, devices): properties = dict() properties['pci.device_subclass'] = 7
Modified: trunk/tests/suspend/suspend.py =================================================================== --- trunk/tests/suspend/suspend.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/suspend/suspend.py 2011-07-12 10:42:29 UTC (rev 995) @@ -204,8 +204,8 @@
# disable this test in auto mode if self.getMode() == Constants.auto: - print("Warning: Test Mode %s, Suspend/Resume NOT TESTED!" % self.getMode()) - return PASSED + print "Error: suspend test can not be run in auto mode." + return FAILDED
methods = self.getSuspendMethods() if not methods or len(methods) is 0:
Modified: trunk/tests/tape/tape.py =================================================================== --- trunk/tests/tape/tape.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/tape/tape.py 2011-07-12 10:42:29 UTC (rev 995) @@ -33,7 +33,7 @@ self.deviceClass = DeviceClass.sequential
def tags(self): - return [TestTag.interactive, TestTag.certification] + return [TestTag.noninteractive, TestTag.certification]
def plan(self, devices): tests = list()
Modified: trunk/tests/usb/usb.py =================================================================== --- trunk/tests/usb/usb.py 2011-07-12 10:39:28 UTC (rev 994) +++ trunk/tests/usb/usb.py 2011-07-12 10:42:29 UTC (rev 995) @@ -78,9 +78,9 @@ # check for USB devices, print info about them self.checkAllUSBPortsUnplugged() self.fixedDevices = len(self.pluggedInDevices) - if self.getMode() != Constants.normal: - print("Test Mode: %s, USB Sockets NOT TESTED!" % self.getMode()) - self.result = Constants.PASS + if self.getMode() == Constants.auto: + print "Error: the usb test can not be run in auto mode." + self.result = Constants.FAIL return 0
self.numberOfSockets = string.atoi(self.prompt("How many USB sockets are required to be tested? "))
v7-commits@lists.stg.fedorahosted.org