Changeset 103499 in vbox
- Timestamp:
- Feb 21, 2024 2:44:17 PM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/audio/tdAudioTest.py
r103494 r103499 66 66 67 67 # pylint: disable=unnecessary-semicolon 68 69 class tdDebugSettings(object): 70 """ 71 Contains local test debug settings. 72 """ 73 def __init__(self, sVkatExeHst = None): 74 # Absolute path of VKAT on the host side which gets uploaded from the host. 75 self.sVkatExeHst = sVkatExeHst; 76 # Absolute path of VKAT on the guest side (which got uploaded from the host). 77 self.sVkatExeGst = None; 68 78 69 79 class tdAudioTest(vbox.TestDriver): … … 96 106 ]; 97 107 self.asTests = self.asTestsDef; 108 self.oDebug = tdDebugSettings(); 98 109 99 110 # Optional arguments passing to VKAT when doing the actual audio tests. … … 134 145 reporter.log(' --audio-controller-type <HDA|AC97|SB16>'); 135 146 reporter.log(' Default: recommended controller'); 147 reporter.log(' --audio-debug-img <path/to/vkat>'); 136 148 reporter.log(' --audio-test-count <number>'); 137 149 reporter.log(' Default: 0 (means random)'); … … 178 190 else: 179 191 raise base.InvalidOption('The "--audio-controller-type" value "%s" is not valid' % (asArgs[iArg])); 192 elif asArgs[iArg] == '--audio-debug-img': 193 iArg += 1; 194 if iArg >= len(asArgs): 195 raise base.InvalidOption('Option "%s" needs a value' % (asArgs[iArg - 1])); 196 self.oDebug.sVkatExeHst = asArgs[iArg]; 180 197 elif asArgs[iArg] == '--audio-test-count' \ 181 198 or asArgs[iArg] == '--audio-test-tone-duration' \ … … 210 227 return iArg + 1; 211 228 229 def prepareGuestForDebugging(self, oSession, oTxsSession, oTestVm): # pylint: disable=unused-argument 230 """ 231 Prepares a guest for (manual) debugging. 232 233 This involves copying over and invoking a the locally built VKAT binary. 234 """ 235 236 if self.oDebug.sVkatExeHst is None: # If no debugging enabled, bail out. 237 reporter.log('Skipping debugging'); 238 return True; 239 240 self.oDebug.sVkatExeGst = oTestVm.pathJoin(self.getGuestTempDir(oTestVm), 'vkat${EXESUFF}'); 241 242 reporter.log('Preparing for debugging ...'); 243 244 try: 245 reporter.log('Uploading "%s" to "%s" ...' % (self.oDebug.sVkatExeHst, self.oDebug.sVkatExeGst)); 246 oTxsSession.syncUploadFile(self.oDebug.sVkatExeHst, self.oDebug.sVkatExeGst); 247 248 if oTestVm.isLinux(): 249 oTxsSession.syncChMod(self.oDebug.sVkatExeGst, 0o755); 250 except: 251 return reporter.errorXcpt('Unable to prepare for debugging'); 252 253 return True; 254 212 255 def actionVerify(self): 213 256 """ … … 525 568 reporter.log('Guest audio test tag is \"%s\"' % (sTag)); 526 569 527 fRc, sVkatExe = self.locateGstBinary(oSession, oTxsSession, self.asGstVkatPaths); 570 if self.oDebug.sVkatExeGst is None: 571 fRc, sVkatExe = self.locateGstBinary(oSession, oTxsSession, self.asGstVkatPaths); 572 else: 573 sVkatExe = self.oDebug.sVkatExeGst; 574 fRc = True; 528 575 if fRc: 529 576 reporter.log('Using VKAT on guest at \"%s\"' % (sVkatExe)); … … 825 872 reporter.testDone(); 826 873 827 reporter.log('Waiting for any OS startup sounds getting played (to skip those) ...'); 828 time.sleep(5); 829 830 if oSession is not None: 874 if oSession is not None: 875 876 self.prepareGuestForDebugging(oSession, oTxsSession, oTestVm); 877 878 reporter.log('Waiting for any OS startup sounds getting played (to skip those) ...'); 879 time.sleep(5); 880 831 881 self.addTask(oTxsSession); 832 882
Note:
See TracChangeset
for help on using the changeset viewer.