Changeset 98592 in vbox
- Timestamp:
- Feb 15, 2023 3:11:09 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155878
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py
r98103 r98592 340 340 """ Sets a system-wide environment variable on the guest. Only supports Windows guests so far. """ 341 341 _ = oSession; 342 if oTestVm. isWindows():342 if oTestVm.sKind not in ('WindowsNT4',): 343 343 sPathRegExe = oTestVm.pathJoin(self.getGuestSystemDir(oTestVm), 'reg.exe'); 344 344 self.txsRunTest(oTxsSession, ('Set env var \"%s\"' % (sName,)), … … 365 365 if oTestVm.sKind not in ('WindowsNT4', 'Windows2000', 'WindowsXP', 'Windows2003'): 366 366 fRc = self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, 367 '${CDROM}/%s/cert/VBoxCertUtil.exe' % self.sGstPathGaPrefix, 368 ('${CDROM}/%s/cert/VBoxCertUtil.exe' % self.sGstPathGaPrefix, 'add-trusted-publisher', 369 '${CDROM}/%s/cert/vbox-sha1.cer' % self.sGstPathGaPrefix), 367 '${CDROM}/%s/cert/VBoxCertUtil.exe' % (self.sGstPathGaPrefix,), 368 ('${CDROM}/%s/cert/VBoxCertUtil.exe' % (self.sGstPathGaPrefix,), 369 'add-trusted-publisher', 370 '${CDROM}/%s/cert/vbox-sha1.cer' % (self.sGstPathGaPrefix,)), 370 371 fCheckSessionStatus = True); 371 372 if not fRc: … … 373 374 else: 374 375 fRc = self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, 375 '${CDROM}/%s/cert/VBoxCertUtil.exe' % self.sGstPathGaPrefix, 376 ('${CDROM}/%s/cert/VBoxCertUtil.exe' % self.sGstPathGaPrefix, 'add-trusted-publisher', 377 '${CDROM}/%s/cert/vbox-sha256.cer' % self.sGstPathGaPrefix), fCheckSessionStatus = True); 376 '${CDROM}/%s/cert/VBoxCertUtil.exe' % (self.sGstPathGaPrefix,), 377 ('${CDROM}/%s/cert/VBoxCertUtil.exe' % (self.sGstPathGaPrefix,), 378 'add-trusted-publisher', 379 '${CDROM}/%s/cert/vbox-sha256.cer' % (self.sGstPathGaPrefix,)), 380 fCheckSessionStatus = True); 378 381 if not fRc: 379 382 reporter.error('Error installing SHA256 certificate'); … … 394 397 # Apply The SetupAPI logging level so that we also get the (most verbose) setupapi.dev.log file. 395 398 ## @todo !!! HACK ALERT !!! Add the value directly into the testing source image. Later. 396 sRegExe = oTestVm.pathJoin(self.getGuestSystemDir(oTestVm), 'reg.exe'); 397 fHaveSetupApiDevLog = self.txsRunTest(oTxsSession, 'Enabling setupapi.dev.log', 30 * 1000, 398 sRegExe, 399 (sRegExe, 'add', 400 '"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup"', 401 '/v', 'LogLevel', '/t', 'REG_DWORD', '/d', '0xFF'), 402 fCheckSessionStatus = True); 399 fHaveSetupApiDevLog = False; 400 if oTestVm.sKind not in ('WindowsNT4',): 401 sRegExe = oTestVm.pathJoin(self.getGuestSystemDir(oTestVm), 'reg.exe'); 402 fHaveSetupApiDevLog = self.txsRunTest(oTxsSession, 'Enabling setupapi.dev.log', 30 * 1000, 403 sRegExe, 404 (sRegExe, 'add', 405 '"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup"', 406 '/v', 'LogLevel', '/t', 'REG_DWORD', '/d', '0xFF'), 407 fCheckSessionStatus = True); 403 408 404 409 for sGstFile, _ in aasLogFiles: … … 407 412 # Enable installing the optional auto-logon modules (VBoxGINA/VBoxCredProv). 408 413 # Also tell the installer to produce the appropriate log files. 409 sExe = '${CDROM}/%s/VBoxWindowsAdditions.exe' % self.sGstPathGaPrefix;414 sExe = '${CDROM}/%s/VBoxWindowsAdditions.exe' % (self.sGstPathGaPrefix,); 410 415 asArgs = [ sExe, '/S', '/l', '/with_autologon' ]; 411 416 … … 413 418 # Note: Don't force installing when the Guest Additions installer should do this automatically, 414 419 # i.e, only force it for Windows Server 2016 and up. 415 fForceInstallTimeStampCA = False; 416 if self.fpApiVer >= 6.1 \ 417 and oTestVm.getNonCanonicalGuestOsType() \ 418 in [ 'Windows2016', 'Windows2019', 'Windows2022', 'Windows11' ]: 419 fForceInstallTimeStampCA = True; 420 421 # As we don't have a console command line to parse for the Guest Additions installer (only a message box) and 422 # unknown / unsupported parameters get ignored with silent installs anyway, we safely can add the following parameter(s) 423 # even if older Guest Addition installers might not support those. 424 if fForceInstallTimeStampCA: 425 asArgs.extend([ '/install_timestamp_ca' ]); 420 # Note! This may mess up testing if GA ISO is from before r152467 when the option was added. 421 # Just add a VBox revision check here if we're suddenly keen on testing old stuff. 422 if ( self.fpApiVer >= 6.1 423 and oTestVm.getNonCanonicalGuestOsType() in [ 'Windows2016', 'Windows2019', 'Windows2022', 'Windows11' ]): 424 asArgs.append('/install_timestamp_ca'); 426 425 427 426 # 428 427 # Do the actual install. 429 428 # 430 fRc = self.txsRunTest(oTxsSession, 'VBoxWindowsAdditions.exe', 5 * 60 * 1000, 431 sExe, asArgs, fCheckSessionStatus = True); 429 fRc = self.txsRunTest(oTxsSession, 'VBoxWindowsAdditions.exe', 5 * 60 * 1000, sExe, asArgs, fCheckSessionStatus = True); 432 430 433 431 # Add the Windows Guest Additions installer files to the files we want to download
Note:
See TracChangeset
for help on using the changeset viewer.