Changeset 104343 in webkit


Ignore:
Timestamp:
Jan 6, 2012 2:46:20 PM (12 years ago)
Author:
ddkilzer@apple.com
Message:

run-api-tests: specify individual suites and tests on the command-line

Reviewed by Adam Roben.

Fixes: <http://webkit.org/b/75065> run-api-tests should be able to run individual suites and tests

The run-api-tests script will now accept a list of arguments on
the command-line that are used as prefix filters. To run all
tests in a suite that starts with "WTF" (WTF and WTF_Vector)
use:

$ run-api-tests WTF

To run only the tests in the "WTF" suite, not the "WTF_Vector"
suite, use:

$ run-api-tests WTF.

  • Scripts/run-api-tests: Filter tests if any prefix arguments

are passed on the command-line.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r104342 r104343  
     12012-01-06  David Kilzer  <ddkilzer@apple.com>
     2
     3        run-api-tests: specify individual suites and tests on the command-line
     4
     5        Reviewed by Adam Roben.
     6
     7        Fixes: <http://webkit.org/b/75065> run-api-tests should be able to run individual suites and tests
     8
     9        The run-api-tests script will now accept a list of arguments on
     10        the command-line that are used as prefix filters.  To run all
     11        tests in a suite that starts with "WTF" (WTF and WTF_Vector)
     12        use:
     13
     14            $ run-api-tests WTF
     15
     16        To run only the tests in the "WTF" suite, not the "WTF_Vector"
     17        suite, use:
     18
     19            $ run-api-tests WTF.
     20
     21        * Scripts/run-api-tests: Filter tests if any prefix arguments
     22        are passed on the command-line.
     23
    1242012-01-06  David Kilzer  <ddkilzer@apple.com>
    225
  • trunk/Tools/Scripts/run-api-tests

    r104342 r104343  
    2424# THE POSSIBILITY OF SUCH DAMAGE.
    2525
    26 # Features to add:
    27 #   - Command line option to run a single test.
    28 #   - Command line option to run all tests in a suite.
    29 
    3026use strict;
    3127use warnings;
     
    6359my $programName = basename($0);
    6460my $usage = <<EOF;
    65 Usage: $programName [options]
     61Usage: $programName [options] [suite or test prefixes]
    6662  --help                Show this help message
    6763  -v|--verbose          Verbose output
     
    8884my @testsToRun = listAllTests();
    8985
     86@testsToRun = grep { my $test = $_; grep { $test =~ m/^\Q$_\E/ } @ARGV; } @testsToRun if @ARGV;
     87
    9088if ($dumpTests) {
    9189    dumpTestsBySuite(@testsToRun);
     
    9391}
    9492
    95 if (runTestsBySuite(@testsToRun, $verbose)) {
    96     exit 1;
    97 }
     93exit runTestsBySuite(@testsToRun, $verbose);
    9894
    9995sub isSupportedPlatform()
Note: See TracChangeset for help on using the changeset viewer.