Changeset 91119 in vbox for trunk/src/VBox/ValidationKit/tests/audio
- Timestamp:
- Sep 6, 2021 9:35:26 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/audio/tdAudioTest.py
r91118 r91119 34 34 35 35 # Standard Python imports. 36 from datetime import datetime 36 37 import os 37 38 import sys 38 39 import signal 39 40 import subprocess 40 import uuid41 41 42 42 # Only the main script needs to modify the path. … … 397 397 return iRc; 398 398 399 def startVkatOnGuest(self, oTestVm, oSession, oTxsSession ):399 def startVkatOnGuest(self, oTestVm, oSession, oTxsSession, sTag): 400 400 """ 401 401 Starts VKAT on the guest (running in background). … … 407 407 reporter.log('Guest audio test temp path is \"%s\"' % (sPathAudioOut)); 408 408 reporter.log('Guest audio test output path is \"%s\"' % (sPathAudioTemp)); 409 reporter.log('Guest audio test tag is \"%s\"' % (sTag)); 409 410 410 411 fRc, sVkatExe = self.locateGstVkat(oSession, oTxsSession); … … 415 416 416 417 asArgsVkat = [ sVkatExe, 'test', '--mode', 'guest', '--probe-backends', \ 417 '--tempdir', sPathAudioTemp, '--outdir', sPathAudioOut ]; 418 '--tempdir', sPathAudioTemp, '--outdir', sPathAudioOut, \ 419 '--tag', sTag ]; 418 420 419 421 asArgs.extend(asArgsVkat); … … 467 469 return fRc; 468 470 469 def runTests(self, oTestVm, oSession, oTxsSession, sDesc, asTests):471 def runTests(self, oTestVm, oSession, oTxsSession, sDesc, sTag, asTests): 470 472 """ 471 473 Runs one or more tests using VKAT on the host, which in turn will … … 474 476 """ 475 477 _ = oSession, oTxsSession; 476 sTag = uuid.uuid4();477 478 478 479 sPathTemp = self.sScratchPath; … … 492 493 # Build the base command line, exclude all tests by default. 493 494 asArgs = [ sVkatExe, 'test', '--mode', 'host', '--probe-backends', \ 494 '--tempdir', sPathAudioTemp, '--outdir', sPathAudioOut, '-a' ]; 495 '--tempdir', sPathAudioTemp, '--outdir', sPathAudioOut, '-a', \ 496 '--tag', sTag, \ 497 '--no-verify' ]; # We do the verification separately in the step below. 495 498 496 499 for _ in range(1, reporter.getVerbosity()): # Verbosity always is initialized at 1. … … 507 510 reporter.testDone(); 508 511 512 if fRc: 513 # 514 # When running the test(s) above were successful, do the verification step next. 515 # This gives us a bit more fine-grained test results in the test manager. 516 # 517 reporter.testStart('Verifying audio data'); 518 519 sNameSetHst = '%s-host.tar.gz' % (sTag); 520 sPathSetHst = oTestVm.pathJoin(sPathAudioOut, sNameSetHst); 521 sNameSetGst = '%s-guest.tar.gz' % (sTag); 522 sPathSetGst = oTestVm.pathJoin(sPathAudioOut, sNameSetGst); 523 524 asArgs = [ sVkatExe, 'verify', sPathSetHst, sPathSetGst ]; 525 526 for _ in range(1, reporter.getVerbosity()): # Verbosity always is initialized at 1. 527 asArgs.extend([ '-v' ]); 528 529 fRc = self.executeHst("VKAT Host Verify", asArgs); 530 if fRc: 531 reporter.error("Verification audio data successful"); 532 else: 533 # 534 # Add the test sets to the test manager for later (manual) diagnosis. 535 # 536 reporter.addLogFile(sPathSetGst, 'misc/other', 'Guest audio test set'); 537 reporter.addLogFile(sPathSetHst, 'misc/other', 'Host audio test set'); 538 539 reporter.error("Verification of audio data failed"); 540 541 reporter.testDone(); 542 509 543 return fRc; 510 544 … … 527 561 reporter.log("Active tests: %s" % (self.asTests,)); 528 562 529 fRc = self.startVkatOnGuest(oTestVm, oSession, oTxsSession); 563 # Define a tag for the whole run. 564 sTag = oTestVm.sVmName + "_" + datetime.now().strftime("%Y%m%d_%H%M%S"); 565 566 fRc = self.startVkatOnGuest(oTestVm, oSession, oTxsSession, sTag); 530 567 if fRc: 531 568 # … … 533 570 # 534 571 if "guest_tone_playback" in self.asTests: 535 fRc = self.runTests(oTestVm, oSession, oTxsSession, 'Guest audio playback', asTests = [ '-i0' ]); 572 fRc = self.runTests(oTestVm, oSession, oTxsSession, \ 573 'Guest audio playback', sTag + "_test_playback", \ 574 asTests = [ '-i0' ]); 536 575 if "guest_tone_recording" in self.asTests: 537 fRc = fRc and self.runTests(oTestVm, oSession, oTxsSession, 'Guest audio recording', asTests = [ '-i1' ]); 576 fRc = fRc and self.runTests(oTestVm, oSession, oTxsSession, \ 577 'Guest audio recording', sTag + "_test_recording", \ 578 asTests = [ '-i1' ]); 538 579 539 580 # Cancel guest VKAT execution task summoned by startVkatOnGuest().
Note:
See TracChangeset
for help on using the changeset viewer.