Changeset 79970 in vbox for trunk/src/VBox/ValidationKit/tests/installation
- Timestamp:
- Jul 25, 2019 3:06:33 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 132401
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/installation/tdGuestOsUnattendedInst1.py
r79933 r79970 49 49 from testdriver import vboxcon; 50 50 from testdriver import vboxtestvms; 51 from common import utils; 51 52 52 53 # Sub-test driver imports. … … 63 64 kfUbuntuAvx2Crash = 0x0001; ##< Disables AVX2 as ubuntu 16.04 think it means AVX512 is available and compiz crashes. 64 65 kfNoGAs = 0x0002; ##< No guest additions installation possible. 66 kfKeyFile = 0x0004; ##< ISO requires a .key file containing the product key. 67 kfNeedCom1 = 0x0008; ##< Need serial port, typically for satifying the windows kernel debugger. 68 65 69 kfIdeIrqDelay = 0x1000; 66 70 kfUbuntuNewAmdBug = 0x2000; … … 90 94 if fFlags & self.kfIdeIrqDelay: 91 95 self.asOptExtraData += self.kasIdeIrqDelay; 96 if fFlags & self.kfNeedCom1: 97 self.fCom1RawFile = True; 92 98 93 99 def _unattendedConfigure(self, oIUnattended, oTestDrv): # type: (Any, vbox.TestDriver) -> bool … … 122 128 else: 123 129 reporter.log("Warning! Ignoring request to install Guest Additions as kfNoGAs is set!"); 130 131 # 132 # Product key? 133 # 134 if self.fInstVmFlags & UnattendedVm.kfKeyFile: 135 sKeyFile = ''; 136 sKey = ''; 137 try: 138 sKeyFile = oIUnattended.isoPath + '.key'; 139 oFile = utils.openNoInherit(sKeyFile); 140 for sLine in oFile: 141 sLine = sLine.strip(); 142 if sLine and not sLine.startswith(';') and not sLine.startswith('#') and not sLine.startswith('//'): 143 sKey = sLine; 144 break; 145 oFile.close(); 146 except: 147 return reporter.errorXcpt('sKeyFile=%s' % (sKeyFile,)); 148 if not sKey: 149 return reporter.error('No key in keyfile (%s)!' % (sKeyFile,)); 150 try: oIUnattended.productKey = sKey; 151 except: return reporter.errorXcpt(); 124 152 125 153 return True; … … 192 220 193 221 def getResourceSet(self): 222 asRet = []; 194 223 if not os.path.isabs(self.sInstallIso): 195 return [self.sInstallIso,]; 196 return []; 224 asRet.append(self.sInstallIso); 225 if self.fInstVmFlags & UnattendedVm.kfKeyFile: 226 asRet.append(self.sInstallIso + '.key'); 227 return asRet; 197 228 198 229 def _createVmDoIt(self, oTestDrv, eNic0AttachType, sDvdImage): … … 202 233 # We want predicable results. 203 234 # 204 if eNic0AttachType is None \ 205 and self.isLinux() \ 206 and ( 'ubuntu' in self.sKind.lower() 207 or 'debian' in self.sKind.lower() ): 208 eNic0AttachType = vboxcon.NetworkAttachmentType_HostOnly; 235 if eNic0AttachType is None: 236 if self.isLinux() \ 237 and ( 'ubuntu' in self.sKind.lower() 238 or 'debian' in self.sKind.lower()): 239 eNic0AttachType = vboxcon.NetworkAttachmentType_HostOnly; 240 241 # Also use it for windows xp to prevent it from ever going online. 242 if self.sKind in ('WindowsXP','WindowsXP_64',): 243 eNic0AttachType = vboxcon.NetworkAttachmentType_HostOnly; 209 244 210 245 return vboxtestvms.BaseTestVm._createVmDoIt(self, oTestDrv, eNic0AttachType, sDvdImage); … … 400 435 oSet.aoTestVms.extend([ 401 436 # 402 # Windows 437 # Windows. The older windows ISOs requires a keyfile (for xp sp3 438 # pick a key from the PID.INF file on the ISO). 403 439 # 440 UnattendedVm(oSet, 'tst-xp-32', 'WindowsXP', '6.0/uaisos/en_winxp_pro_x86_build2600_iso.img', UnattendedVm.kfKeyFile), # >=2GiB 441 UnattendedVm(oSet, 'tst-xpsp2-32', 'WindowsXP', '6.0/uaisos/en_winxp_pro_with_sp2.iso', UnattendedVm.kfKeyFile), # >=2GiB 442 UnattendedVm(oSet, 'tst-xpsp3-32', 'WindowsXP', '6.0/uaisos/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso', UnattendedVm.kfKeyFile), # >=2GiB 443 UnattendedVm(oSet, 'tst-xp-64', 'WindowsXP_64', '6.0/uaisos/en_win_xp_pro_x64_vl.iso', UnattendedVm.kfKeyFile), # >=3GiB 444 UnattendedVm(oSet, 'tst-xpsp2-64', 'WindowsXP_64', '6.0/uaisos/en_win_xp_pro_x64_with_sp2_vl_x13-41611.iso', UnattendedVm.kfKeyFile), # >=3GiB 445 #fixme: UnattendedVm(oSet, 'tst-xpchk-64', 'WindowsXP_64', '6.0/uaisos/en_windows_xp_professional_x64_chk.iso', UnattendedVm.kfKeyFile | UnattendedVm.kfNeedCom1), # >=3GiB 446 # No key files needed: 404 447 UnattendedVm(oSet, 'tst-vista-32', 'WindowsVista', '6.0/uaisos/en_windows_vista_ee_x86_dvd_vl_x13-17271.iso'), # >=6GiB 405 448 UnattendedVm(oSet, 'tst-vista-64', 'WindowsVista_64', '6.0/uaisos/en_windows_vista_enterprise_x64_dvd_vl_x13-17316.iso'), # >=8GiB
Note:
See TracChangeset
for help on using the changeset viewer.