VirtualBox

Changeset 91212 in vbox


Ignore:
Timestamp:
Sep 10, 2021 5:04:03 PM (3 years ago)
Author:
vboxsync
Message:

Audio/VKAT: Implemented support for (optional) VKAT "test" command arguments in the test driver. bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/audio/tdAudioTest.py

    r91201 r91212  
    8585        self.asTests          = self.asTestsDef;
    8686
     87        # Optional arguments passing to VKAT when doing the actual audio tests.
     88        self.asVkatTestArgs   = [];
    8789        # Optional arguments passing to VKAT when verifying audio test sets.
    8890        self.asVkatVerifyArgs = [];
     
    110112        reporter.log('  --audio-tests   <s1[:s2[:]]>');
    111113        reporter.log('      Default: %s  (all)' % (':'.join(self.asTestsDef)));
     114        reporter.log('  --audio-test-count <number>');
     115        reporter.log('      Default: 0 (means random)');
    112116        reporter.log('  --audio-verify-max-diff-count <number>');
    113117        reporter.log('      Default: 0 (strict)');
     
    138142                        raise base.InvalidOption('The "--audio-tests" value "%s" is not valid; valid values are: %s'
    139143                                                    % (s, ' '.join(self.asTestsDef)));
     144        elif    asArgs[iArg] == '--audio-test-count':
     145            # Strip the "--audio-test-" prefix and keep the options as defined in VKAT,
     146            # e.g. "--audio-test-count" -> "--count". That way we don't
     147            # need to do any special argument translation and whatnot.
     148            self.asVkatTestArgs.extend(['--' + asArgs[iArg][len('--audio-test-'):]]);
     149            iArg += 1;
     150            if iArg >= len(asArgs):
     151                raise base.InvalidOption('Option "%s" needs a value' % (asArgs[iArg - 1]));
     152            self.asVkatTestArgs.extend([asArgs[iArg]]);
    140153        elif    asArgs[iArg] == '--audio-verify-max-diff-count' \
    141154             or asArgs[iArg] == '--audio-verify-max-diff-percent' \
     
    528541            asArgs.extend([ '-v' ]);
    529542
     543        if self.asVkatTestArgs:
     544            asArgs += self.asVkatTestArgs;
     545
    530546        # ... and extend it with wanted tests.
    531547        asArgs.extend(asTests);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette