Changeset 103340 in vbox for trunk/src/VBox
- Timestamp:
- Feb 13, 2024 5:58:46 PM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 161649
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/audio/tdAudioTest.py
r98651 r103340 361 361 reporter.logXcpt('Executing "%s" failed!' % (sWhat)); 362 362 363 reporter.log('Executing \"%s\" on host %s' % (sWhat, 'done' if fRc else 'failed',)); 363 364 return fRc; 364 365 … … 367 368 Thread execution helper to run a process on the host. 368 369 """ 369 fRc = self.executeHstLoop(sWhat, asArgs, asEnv, fAsAdmin); 370 if fRc: 371 reporter.log('Executing \"%s\" on host done' % (sWhat,)); 372 else: 373 reporter.log('Executing \"%s\" on host failed' % (sWhat,)); 374 375 def executeHst(self, sWhat, asArgs, asEnv = None, fAsAdmin = False): 370 return self.executeHstLoop(sWhat, asArgs, asEnv, fAsAdmin); 371 372 def executeHst(self, sWhat, asArgs, asEnv = None, fAsAdmin = False, fBlocking = False): 376 373 """ 377 374 Runs a binary (image) with optional admin (root) rights on the host and … … 382 379 Returns success status (exit code is 0). 383 380 """ 384 reporter.log('Executing \"%s\" on host (as admin = %s)' % (sWhat, fAsAdmin)); 381 reporter.log('Executing \"%s\" on host (as admin = %s, blocking = %s)' % (sWhat, fAsAdmin, fBlocking)); 382 reporter.log2('Arguments: %s' % (asArgs,)); 383 if asEnv: 384 reporter.log2('Environment: %s' % (asEnv,)); 385 385 386 386 try: sys.stdout.flush(); … … 389 389 except: pass; 390 390 391 # Initialize thread rc. 392 self.iThreadHstProcRc = -42; 393 394 try: 395 oThread = threading.Thread(target = self.executeHstThread, args = [ sWhat, asArgs, asEnv, fAsAdmin ]); 396 oThread.start(); 397 while oThread.join(0.1): 398 if not oThread.is_alive(): 399 break; 400 self.processEvents(0); 401 reporter.log2('Thread returned exit code for "%s": %d' % (sWhat, self.iThreadHstProcRc)); 402 except: 403 reporter.logXcpt('Starting thread for "%s" failed' % (sWhat,)); 404 405 return self.iThreadHstProcRc == 0; 391 if not fBlocking: # Run in same thread (blocking). 392 fRc = self.executeHstLoop(sWhat, asArgs, asEnv, fAsAdmin); 393 else: # Run in separate thread (asynchronous). 394 self.iThreadHstProcRc = -42; # Initialize thread rc. 395 try: 396 oThread = threading.Thread(target = self.executeHstThread, args = [ sWhat, asArgs, asEnv, fAsAdmin ]); 397 oThread.start(); 398 while oThread.join(0.1): 399 if not oThread.is_alive(): 400 break; 401 self.processEvents(0); 402 reporter.log2('Thread returned exit code for "%s": %d' % (sWhat, self.iThreadHstProcRc)); 403 except: 404 reporter.logXcpt('Starting thread for "%s" failed' % (sWhat,)); 405 fRc = self.iThreadHstProcRc == 0; 406 407 return fRc; 406 408 407 409 def getWinFirewallArgsDisable(self, sOsType): … … 590 592 reporter.log('Host audio test tag is \"%s\"' % (sTag)); 591 593 594 sVkatExe = self.getBinTool('vkat'); 595 596 reporter.log('Using VKAT on host at: \"%s\"' % (sVkatExe)); 597 598 # Run the VKAT self test. 599 # Doesn't take long and gives us some more clue if it flies on the testboxes. 600 reporter.testStart('VKAT Selftest'); 601 fRc = self.executeHst("VKAT Host Selftest", [ sVkatExe, 'selftest' ], fBlocking = True); 602 reporter.testDone(); 603 if not fRc: 604 return fRc; 605 592 606 reporter.testStart(sDesc); 593 594 sVkatExe = self.getBinTool('vkat');595 596 reporter.log('Using VKAT on host at: \"%s\"' % (sVkatExe));597 607 598 608 # Build the base command line, exclude all tests by default. … … 607 617 608 618 if self.asVkatTestArgs: 609 asArgs += self.asVkatTestArgs;619 asArgs.extend(self.asVkatTestArgs); 610 620 611 621 # ... and extend it with wanted tests. … … 730 740 reporter.log('Audio testing for non-trunk builds skipped.'); 731 741 fSkip = True; 742 743 reporter.log('Verbosity level is: %d' % (reporter.getVerbosity(),)); 732 744 733 745 if not fSkip:
Note:
See TracChangeset
for help on using the changeset viewer.