Commit 0d876f85 authored by ddkilzer@apple.com's avatar ddkilzer@apple.com

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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4f0b6eb1
2012-01-06 David Kilzer <ddkilzer@apple.com>
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.
2012-01-06 David Kilzer <ddkilzer@apple.com>
run-api-tests: change internal representation of tests to array of "SuiteName.TestName" strings
......@@ -23,10 +23,6 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
# Features to add:
# - Command line option to run a single test.
# - Command line option to run all tests in a suite.
use strict;
use warnings;
......@@ -62,7 +58,7 @@ my @testsTimedOut;
my $programName = basename($0);
my $usage = <<EOF;
Usage: $programName [options]
Usage: $programName [options] [suite or test prefixes]
--help Show this help message
-v|--verbose Verbose output
-d|--dump-tests Dump the names of testcases without running them
......@@ -87,14 +83,14 @@ buildTestTool() if $build;
setPathForRunningWebKitApp(\%ENV);
my @testsToRun = listAllTests();
@testsToRun = grep { my $test = $_; grep { $test =~ m/^\Q$_\E/ } @ARGV; } @testsToRun if @ARGV;
if ($dumpTests) {
dumpTestsBySuite(@testsToRun);
exit 0;
}
if (runTestsBySuite(@testsToRun, $verbose)) {
exit 1;
}
exit runTestsBySuite(@testsToRun, $verbose);
sub isSupportedPlatform()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment