Changeset 70695 in vbox for trunk/src/VBox/ValidationKit/tests/smoketests
- Timestamp:
- Jan 22, 2018 11:17:53 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120432
- Location:
- trunk/src/VBox/ValidationKit/tests/smoketests
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/smoketests/Makefile.kmk
r69111 r70695 33 33 ValidationKitTestsSmokeTests_INST = $(INST_VALIDATIONKIT)tests/smoketests/ 34 34 ValidationKitTestsSmokeTests_EXEC_SOURCES := \ 35 $(PATH_SUB_CURRENT)/tdSmokeTest1.py 35 $(PATH_SUB_CURRENT)/tdSmokeTest1.py \ 36 $(PATH_SUB_CURRENT)/tdExoticOrAncient1.py 36 37 37 38 VBOX_VALIDATIONKIT_PYTHON_SOURCES += $(ValidationKitTestsSmokeTests_EXEC_SOURCES) -
trunk/src/VBox/ValidationKit/tests/smoketests/tdExoticOrAncient1.py
r70605 r70695 4 4 5 5 """ 6 VirtualBox Validation Kit - Smoke Test#1.6 VirtualBox Validation Kit - Exotic and/or ancient OSes #1. 7 7 """ 8 8 9 9 __copyright__ = \ 10 10 """ 11 Copyright (C) 2010-201 7Oracle Corporation11 Copyright (C) 2010-2018 Oracle Corporation 12 12 13 13 This file is part of VirtualBox Open Source Edition (OSE), as … … 43 43 # Validation Kit imports. 44 44 from testdriver import reporter; 45 from testdriver import base;46 45 from testdriver import vbox; 47 from testdriver import vboxcon;48 46 49 47 50 class td SmokeTest1(vbox.TestDriver):48 class tdExoticOrAncient1(vbox.TestDriver): 51 49 """ 52 VBox Smoke Test#1.50 VBox exotic and/or ancient OSes #1. 53 51 """ 54 52 … … 56 54 vbox.TestDriver.__init__(self); 57 55 self.asRsrcs = None; 58 self.oTestVmSet = self.oTestVmManager.getSmokeVmSet(); 59 self.sNicAttachmentDef = 'mixed'; 60 self.sNicAttachment = self.sNicAttachmentDef; 61 self.fQuick = False; 56 self.oTestVmSet = self.oTestVmManager.selectSet( self.oTestVmManager.kfGrpAncient 57 | self.oTestVmManager.kfGrpExotic); 62 58 63 59 # … … 66 62 def showUsage(self): 67 63 rc = vbox.TestDriver.showUsage(self); 68 reporter.log('');69 reporter.log('Smoke Test #1 options:');70 reporter.log(' --nic-attachment <bridged|nat|mixed>');71 reporter.log(' Default: %s' % (self.sNicAttachmentDef));72 reporter.log(' --quick');73 reporter.log(' Very selective testing.')74 64 return rc; 75 65 76 66 def parseOption(self, asArgs, iArg): 77 if asArgs[iArg] == '--nic-attachment': 78 iArg += 1; 79 if iArg >= len(asArgs): raise base.InvalidOption('The "--nic-attachment" takes an argument'); 80 self.sNicAttachment = asArgs[iArg]; 81 if self.sNicAttachment not in ('bridged', 'nat', 'mixed'): 82 raise base.InvalidOption('The "--nic-attachment" value "%s" is not supported. Valid values are: bridged, nat' \ 83 % (self.sNicAttachment)); 84 elif asArgs[iArg] == '--quick': 85 # Disable all but a few VMs and configurations. 86 for oTestVm in self.oTestVmSet.aoTestVms: 87 if oTestVm.sVmName == 'tst-win2k3ent': # 32-bit paging 88 oTestVm.asVirtModesSup = [ 'hwvirt' ]; 89 oTestVm.acCpusSup = range(1, 2); 90 elif oTestVm.sVmName == 'tst-rhel5': # 32-bit paging 91 oTestVm.asVirtModesSup = [ 'raw' ]; 92 oTestVm.acCpusSup = range(1, 2); 93 elif oTestVm.sVmName == 'tst-win2k8': # 64-bit 94 oTestVm.asVirtModesSup = [ 'hwvirt-np' ]; 95 oTestVm.acCpusSup = range(1, 2); 96 elif oTestVm.sVmName == 'tst-sol10-64': # SMP, 64-bit 97 oTestVm.asVirtModesSup = [ 'hwvirt' ]; 98 oTestVm.acCpusSup = range(2, 3); 99 elif oTestVm.sVmName == 'tst-sol10': # SMP, 32-bit 100 oTestVm.asVirtModesSup = [ 'hwvirt-np' ]; 101 oTestVm.acCpusSup = range(2, 3); 102 else: 103 oTestVm.fSkip = True; 104 else: 105 return vbox.TestDriver.parseOption(self, asArgs, iArg); 106 return iArg + 1; 67 return vbox.TestDriver.parseOption(self, asArgs, iArg); 107 68 108 69 def actionVerify(self): … … 119 80 return False; 120 81 121 # Do the configuring.122 if self.sNicAttachment == 'nat': eNic0AttachType = vboxcon.NetworkAttachmentType_NAT;123 elif self.sNicAttachment == 'bridged': eNic0AttachType = vboxcon.NetworkAttachmentType_Bridged;124 else: eNic0AttachType = None;125 82 assert self.sVBoxValidationKitIso is not None; 126 return self.oTestVmSet.actionConfig(self, eNic0AttachType = eNic0AttachType,sDvdImage = self.sVBoxValidationKitIso);83 return self.oTestVmSet.actionConfig(self, sDvdImage = self.sVBoxValidationKitIso); 127 84 128 85 def actionExecute(self): … … 142 99 """ 143 100 144 oSession = self.openSession(oVM);145 146 # Enable audio adapter147 oSession.o.machine.audioAdapter.enabled = True;148 149 fRc = oSession.saveSettings();150 fRc = fRc and oSession.close();151 assert fRc is True;152 153 101 # Simple test. 154 102 self.logVmInfo(oVM); 155 oSession, oTxsSession = self.startVmAndConnectToTxsViaTcp(oTestVm.sVmName, fCdWait = True); 156 if oSession is not None: 157 self.addTask(oTxsSession); 158 159 ## @todo do some quick tests: save, restore, execute some test program, shut down the guest. 160 161 # cleanup. 162 self.removeTask(oTxsSession); 163 self.terminateVmBySession(oSession) 164 return True; 103 if oTestVm.fGrouping & self.oTestVmManager.kfGrpNoTxs: 104 pass; ## @todo serial port VMs. 105 else: 106 oSession, _ = self.startVmAndConnectToTxsViaTcp(oTestVm.sVmName, fCdWait = True); 107 if oSession is not None: 108 self.terminateVmBySession(oSession) 109 return True; 165 110 return None; 166 111 167 112 if __name__ == '__main__': 168 sys.exit(td SmokeTest1().main(sys.argv));113 sys.exit(tdExoticOrAncient1().main(sys.argv)); 169 114
Note:
See TracChangeset
for help on using the changeset viewer.