Changeset 103551 in webkit


Ignore:
Timestamp:
Dec 22, 2011 9:29:24 AM (12 years ago)
Author:
ddkilzer@apple.com
Message:

run-api-tests: runAllTests() and runTest() 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:

(runTestsBySuite): Rename from runAllTests(). Add arguments for
list of tests and $verbose.
(runTest): Add $verbose argument.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r103549 r103551  
     12011-12-22  David Kilzer  <ddkilzer@apple.com>
     2
     3        run-api-tests: runAllTests() and runTest() 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:
     10        (runTestsBySuite): Rename from runAllTests().  Add arguments for
     11        list of tests and $verbose.
     12        (runTest): Add $verbose argument.
     13
    1142011-12-22  David Kilzer  <ddkilzer@apple.com>
    215
  • trunk/Tools/Scripts/run-api-tests

    r103549 r103551  
    4242sub dumpTestsBySuite(\%);
    4343sub populateTests();
    44 sub runAllTests();
    45 sub runTest($$);
     44sub runTest($$$);
     45sub runTestsBySuite(\%$);
    4646sub prepareEnvironmentForRunningTestTool();
    4747sub testToolPath();
     
    9393}
    9494
    95 if (runAllTests()) {
     95if (runTestsBySuite(%testsToRun, $verbose)) {
    9696    exit 1;
    9797}
     
    114114}
    115115
    116 sub runAllTests()
    117 {
     116sub runTestsBySuite(\%$)
     117{
     118    my ($tests, $verbose) = @_;
    118119    my $anyFailures = 0;
    119     for my $suite (sort keys %testsToRun) {
     120    for my $suite (sort keys %$tests) {
    120121        print "Suite: $suite\n" unless $verbose;
    121         for my $test (sort @{$testsToRun{$suite}}) {
    122             my $failed = runTest($suite, $test);
     122        for my $test (sort @{$tests->{$suite}}) {
     123            my $failed = runTest($suite, $test, $verbose);
    123124            if ($failed) {
    124125                $anyFailures = 1;
     
    144145}
    145146
    146 sub runTest($$)
    147 {
    148     my ($suite, $testName) = @_;
     147sub runTest($$$)
     148{
     149    my ($suite, $testName, $verbose) = @_;
    149150    my $test = $suite . "." . $testName;
    150151
Note: See TracChangeset for help on using the changeset viewer.