Changeset 83525 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Apr 3, 2020 1:24:31 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py
r83516 r83525 1336 1336 self.cNumSessions = cNumSessions; 1337 1337 1338 class tdDebugSettings(): 1339 """ 1340 Contains local test debug settings. 1341 """ 1342 def __init__(self, sImgPath = None): 1343 self.sImgPath = sImgPath; 1338 1344 1339 1345 class SubTstDrvAddGuestCtrl(base.SubTestDriverBase): … … 1347 1353 ## @todo base.TestBase. 1348 1354 self.asTestsDef = [ 1355 'debug', 1349 1356 'session_basic', 'session_env', 'session_file_ref', 'session_dir_ref', 'session_proc_ref', 'session_reboot', 1350 1357 'exec_basic', 'exec_timeout', … … 1356 1363 self.asTests = self.asTestsDef; 1357 1364 self.fSkipKnownBugs = False; 1358 self.oTestFiles = None # type: vboxtestfileset.TestFileSet 1365 self.oTestFiles = None; # type: vboxtestfileset.TestFileSet 1366 self.oDebug = tdDebugSettings(); 1359 1367 1360 1368 def parseOption(self, asArgs, iArg): # pylint: disable=too-many-branches,too-many-statements … … 1377 1385 self.fSkipKnownBugs = False; 1378 1386 return iArg + 1; 1387 if asArgs[iArg] == '--add-guest-ctrl-debug-img': 1388 iArg += 1; 1389 iNext = self.oTstDrv.requireMoreArgs(1, asArgs, iArg); 1390 self.oDebug.sImgPath = asArgs[iArg]; 1391 return iNext; 1379 1392 return iArg; 1380 1393 … … 1385 1398 reporter.log(' --add-guest-ctrl-skip-known-bugs'); 1386 1399 reporter.log(' Skips known bugs. Default: --no-add-guest-ctrl-skip-known-bugs'); 1400 reporter.log('Debugging:'); 1401 reporter.log(' --add-guest-ctrl-debug-img'); 1402 reporter.log(' Sets VBoxService image to deploy for debugging'); 1387 1403 return True; 1388 1404 … … 1398 1414 atTests = [ 1399 1415 ( True, self.prepareGuestForTesting, None, 'Preparations',), 1416 ( True, self.prepareGuestForDebugging, None, 'Manaul Debugging',), 1400 1417 ( True, self.testGuestCtrlSession, 'session_basic', 'Session Basics',), 1401 1418 ( True, self.testGuestCtrlExec, 'exec_basic', 'Execution',), … … 1505 1522 return SubTstDrvAddGuestCtrl.getGuestSystemDir(oTestVm) + '\\DOSCALL1.DLL'; 1506 1523 return "/bin/sh"; 1524 1525 def prepareGuestForDebugging(self, oSession, oTxsSession, oTestVm): 1526 """ 1527 Prepares a guest for (manual) debugging. 1528 1529 This involves copying over and invoking a the locally built VBoxService binary. 1530 """ 1531 1532 if self.oDebug.sImgPath is None: # If no debugging enabled, bail out. 1533 return True 1534 1535 reporter.log('Preparing for debugging ...'); 1536 1537 try: 1538 1539 if oTestVm.isLinux(): 1540 reporter.log('Uploading %s ...' % self.oDebug.sImgPath); 1541 sFileVBoxServiceHst = self.oDebug.sImgPath; 1542 sFileVBoxServiceGst = "/tmp/VBoxService-txs"; 1543 oTxsSession.syncUploadFile(sFileVBoxServiceHst, sFileVBoxServiceGst); 1544 oTxsSession.syncExec("/bin/chmod", ("/bin/chmod", "755", sFileVBoxServiceGst) ); # syncChMod not implemented yet. 1545 reporter.log('Executing VBoxService (in background)...'); 1546 oTxsSession.syncExec(sFileVBoxServiceGst, (sFileVBoxServiceGst, "-vvvv", "--only-control", \ 1547 "--logfile", "/tmp/VBoxService-txs.log") ); 1548 else: ## @todo Implement others. 1549 return reporter.errorXcpt('Debugging not available on this guest OS yet'); 1550 1551 except: 1552 return reporter.errorXcpt('Unable to prepare for debugging'); 1553 1554 return True; 1507 1555 1508 1556 #
Note:
See TracChangeset
for help on using the changeset viewer.