Changeset 83774 in vbox
- Timestamp:
- Apr 17, 2020 5:56:52 PM (5 years ago)
- Location:
- trunk/src/VBox/ValidationKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r83529 r83774 3720 3720 # pylint: disable=too-many-locals,too-many-arguments 3721 3721 3722 def txsRunTest(self, oTxsSession, sTestName, cMsTimeout, sExecName, asArgs = (), asAddEnv = (), sAsUser = ""): 3722 def txsRunTest(self, oTxsSession, sTestName, cMsTimeout, sExecName, asArgs = (), asAddEnv = (), sAsUser = "", 3723 fCheckSessionStatus = False): 3723 3724 """ 3724 3725 Executes the specified test task, waiting till it completes or times out. … … 3731 3732 Returns False if some unexpected task was signalled or we failed to 3732 3733 submit the job. 3734 3735 If fCheckSessionStatus is set to True, the overall session status will be 3736 taken into account and logged as an error on failure. 3733 3737 """ 3734 3738 reporter.testStart(sTestName); … … 3744 3748 oTask = self.waitForTasks(cMsTimeout + 1); 3745 3749 if oTask is None: 3746 reporter.log('txsRunTest: waitForTasks timed out'); 3750 if fCheckSessionStatus: 3751 reporter.error('txsRunTest: waitForTasks for test "%s" timed out' % (sTestName,)); 3752 else: 3753 reporter.log('txsRunTest: waitForTasks for test "%s" timed out' % (sTestName,)); 3747 3754 break; 3748 3755 if oTask is oTxsSession: 3749 fRc = True; 3750 reporter.log('txsRunTest: isSuccess=%s getResult=%s' % (oTxsSession.isSuccess(), oTxsSession.getResult())); 3756 if fCheckSessionStatus \ 3757 and not oTxsSession.isSuccess(): 3758 reporter.error('txsRunTest: Test "%s" failed' % (sTestName,)); 3759 else: 3760 fRc = True; 3761 reporter.log('txsRunTest: isSuccess=%s getResult=%s' \ 3762 % (oTxsSession.isSuccess(), oTxsSession.getResult())); 3751 3763 break; 3752 3764 if not self.handleTask(oTask, 'txsRunTest'): -
trunk/src/VBox/ValidationKit/tests/additions/tdAddBasic1.py
r83764 r83774 259 259 if oTestVm.sKind not in ('WindowsNT4', 'Windows2000', 'WindowsXP', 'Windows2003'): 260 260 fRc = self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, '${CDROM}/cert/VBoxCertUtil.exe', 261 ('${CDROM}/cert/VBoxCertUtil.exe', 'add-trusted-publisher', '${CDROM}/cert/vbox-sha1.cer') );262 if not fRc \263 or oTxsSession.getResult() is False:261 ('${CDROM}/cert/VBoxCertUtil.exe', 'add-trusted-publisher', '${CDROM}/cert/vbox-sha1.cer'), 262 fCheckSessionStatus = True); 263 if not fRc: 264 264 reporter.error('Error installing SHA1 certificate'); 265 265 else: 266 266 fRc = self.txsRunTest(oTxsSession, 'VBoxCertUtil.exe', 1 * 60 * 1000, '${CDROM}/cert/VBoxCertUtil.exe', 267 267 ('${CDROM}/cert/VBoxCertUtil.exe', 'add-trusted-publisher', 268 '${CDROM}/cert/vbox-sha256.cer')); 269 if not fRc \ 270 or oTxsSession.getResult() is False: 268 '${CDROM}/cert/vbox-sha256.cer'), fCheckSessionStatus = True); 269 if not fRc: 271 270 reporter.error('Error installing SHA256 certificate'); 272 271 … … 291 290 ('c:\\Windows\\System32\\reg.exe', 'add', 292 291 '"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Setup"', 293 '/v', 'LogLevel', '/t', 'REG_DWORD', '/d', '0xFF')); 292 '/v', 'LogLevel', '/t', 'REG_DWORD', '/d', '0xFF'), 293 fCheckSessionStatus = True); 294 294 295 295 for sFile in asLogFiles: … … 302 302 # 303 303 fRc = self.txsRunTest(oTxsSession, 'VBoxWindowsAdditions.exe', 5 * 60 * 1000, '${CDROM}/VBoxWindowsAdditions.exe', 304 ('${CDROM}/VBoxWindowsAdditions.exe', '/S', '/l', '/with_autologon') );304 ('${CDROM}/VBoxWindowsAdditions.exe', '/S', '/l', '/with_autologon'), fCheckSessionStatus = True); 305 305 306 306 # … … 344 344 or oTestVm.sKind.startswith('Ubuntu'): 345 345 fRc = self.txsRunTest(oTxsSession, 'Installing Kernel headers', 5 * 60 *1000, 346 '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'linux-headers-generic') );347 if not fRc \348 or oTxsSession.getResult() is False:346 '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'linux-headers-generic'), 347 fCheckSessionStatus = True); 348 if not fRc: 349 349 reporter.error('Error installing Kernel headers'); 350 350 fRc = self.txsRunTest(oTxsSession, 'Installing Guest Additions depdendencies', 5 * 60 *1000, \ 351 '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'build-essential', 'perl') );352 if not fRc \353 or oTxsSession.getResult() is False:351 '/usr/bin/apt-get', ('/usr/bin/apt-get', 'install', '-y', 'build-essential', 'perl'), 352 fCheckSessionStatus = True); 353 if not fRc: 354 354 reporter.error('Error installing additional installer dependencies'); 355 355 elif oTestVm.sKind.startswith('OL') \ … … 359 359 or oTestVm.sKind.startswith('Cent'): 360 360 fRc = self.txsRunTest(oTxsSession, 'Installing Kernel headers', 5 * 60 *1000, 361 '/usr/bin/yum', ('/usr/bin/yum', '-y', 'install', 'kernel-headers') );362 if not fRc \363 or oTxsSession.getResult() is False:361 '/usr/bin/yum', ('/usr/bin/yum', '-y', 'install', 'kernel-headers'), 362 fCheckSessionStatus = True); 363 if not fRc: 364 364 reporter.error('Error installing Kernel headers'); 365 365 fRc = self.txsRunTest(oTxsSession, 'Installing Guest Additions depdendencies', 5 * 60 *1000, \ 366 366 '/usr/bin/yum', ('/usr/bin/yum', '-y', 'install', \ 367 'make', 'automake', 'gcc', 'kernel-devel', 'dkms', 'bzip2', 'perl') );368 if not fRc \369 or oTxsSession.getResult() is False:367 'make', 'automake', 'gcc', 'kernel-devel', 'dkms', 'bzip2', 'perl'), 368 fCheckSessionStatus = True); 369 if not fRc: 370 370 reporter.error('Error installing additional installer dependencies'); 371 371 else: … … 379 379 # 380 380 fRc = self.txsRunTest(oTxsSession, 'VBoxLinuxAdditions.run', 5 * 60 * 1000, 381 '/bin/sh', ('/bin/sh', '${CDROM}/VBoxLinuxAdditions.run')); 382 if not fRc \ 383 or oTxsSession.getResult() is False: 381 '/bin/sh', ('/bin/sh', '${CDROM}/VBoxLinuxAdditions.run'), fCheckSessionStatus = True); 382 if not fRc: 384 383 reporter.error('Installing Linux Additions failed (see log file for details)'); 385 384
Note:
See TracChangeset
for help on using the changeset viewer.