Changeset 103545 in webkit


Ignore:
Timestamp:
Dec 22, 2011 8:32:03 AM (12 years ago)
Author:
ddkilzer@apple.com
Message:

run-api-tests: dumpAllTests() should not use global variables

Reviewed by Adam Roben.

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

  • Scripts/run-api-tests: Renamed $dump to $dumpTests.

(dumpTestsBySuite): Rename from dumpAllTests() and pass in
global data as an argument. Sort suite names and test names
alphabetically to match output when running tests.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r103540 r103545  
     12011-12-22  David Kilzer  <ddkilzer@apple.com>
     2
     3        run-api-tests: dumpAllTests() should not use global variables
     4
     5        Reviewed by Adam Roben.
     6
     7        Part of: <http://webkit.org/b/75065> run-api-tests should be able to run individual suites and tests
     8
     9        * Scripts/run-api-tests: Renamed $dump to $dumpTests.
     10        (dumpTestsBySuite): Rename from dumpAllTests() and pass in
     11        global data as an argument.  Sort suite names and test names
     12        alphabetically to match output when running tests.
     13
    1142011-12-22  Leo Yang  <leo.yang@torchmobile.com.cn>
    215
  • trunk/Tools/Scripts/run-api-tests

    r101821 r103545  
    4040
    4141sub buildTestTool();
    42 sub dumpAllTests();
     42sub dumpTestsBySuite(\%);
    4343sub populateTests();
    4444sub runAllTests();
     
    5656my $showHelp = 0;
    5757my $verbose = 0;
    58 my $dump = 0;
     58my $dumpTests = 0;
    5959my $build = 1;
    6060my $buildDefault = $build ? "build" : "do not build";
     
    7575    'help' => \$showHelp,
    7676    'verbose|v' => \$verbose,
    77     'dump|d' => \$dump,
     77    'dump|d' => \$dumpTests,
    7878    'build!' => \$build
    7979);
     
    8989my %testsToRun = populateTests();
    9090
    91 if ($dump) {
    92     dumpAllTests();
     91if ($dumpTests) {
     92    dumpTestsBySuite(%testsToRun);
    9393    exit 0;
    9494}
     
    103103}
    104104
    105 sub dumpAllTests()
    106 {
     105sub dumpTestsBySuite(\%)
     106{
     107    my ($testsBySuite) = @_;
    107108    print "Dumping test cases\n";
    108109    print "------------------\n";
    109     for my $suite (keys %testsToRun) {
     110    for my $suite (sort keys %$testsBySuite) {
    110111        print $suite . ":\n";
    111         print map { "   " . $_ . "\n" } @{ $testsToRun{$suite} };
     112        print map { "   " . $_ . "\n" } sort @{ $testsBySuite->{$suite} };
    112113    }
    113114    print "------------------\n";
Note: See TracChangeset for help on using the changeset viewer.