diff options
author | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 19:36:32 +0000 |
---|---|---|
committer | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 19:36:32 +0000 |
commit | 580c8ac6c3955c427e1ee81aad3d9bc58e26900f (patch) | |
tree | 5e82f67d8115b2b85c56b1cc90067481227567fa /webkit/tools/test_shell/test_shell_main.cc | |
parent | bdef78b5707e7f667a1e9c438b763cfedbda8177 (diff) | |
download | chromium_src-580c8ac6c3955c427e1ee81aad3d9bc58e26900f.zip chromium_src-580c8ac6c3955c427e1ee81aad3d9bc58e26900f.tar.gz chromium_src-580c8ac6c3955c427e1ee81aad3d9bc58e26900f.tar.bz2 |
Add concept of slow tests. Only mark one test as slow for now. After checkin, I'll add a ton of slow tests and reduce the timeout for non-slow tests to something like 1 second.
To aid in that, I've added 90th percentile and 99th percentile times to the statistics we report. Also made it so that tests marked as slow and timeout/crash tests are listed separately from the slowest 50 tests so that list can be used to know which tests to mark slow.
Tests cannot be marked as both SLOW and TIMEOUT. If the test times out, then we want it to timeout early to avoid waiting a long timeout for a test that we know is just going to timeout.
TestShell can now do per-test timeouts. We could easily make run-webkit-tests do per-test timeouts, but I think just having the one modifier of SLOW is easier to grok. Makes the test lists simpler and allows for having longer timeouts on debug/purify builders.
BUG=9324
Review URL: http://codereview.chromium.org/67198
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13867 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell_main.cc')
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index 58e202d..a0ce4a9 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -263,15 +263,23 @@ int main(int argc, char* argv[]) { // Watch stdin for URLs. char filenameBuffer[kPathBufSize]; while (fgets(filenameBuffer, sizeof(filenameBuffer), stdin)) { - char *newLine = strchr(filenameBuffer, '\n'); + char* newLine = strchr(filenameBuffer, '\n'); if (newLine) *newLine = '\0'; if (!*filenameBuffer) continue; - params.test_url = filenameBuffer; + params.test_url = strtok(filenameBuffer, " "); + + char* timeout = strtok(NULL, " "); + int old_timeout_ms = TestShell::GetLayoutTestTimeout(); + if (timeout) + TestShell::SetFileTestTimeout(atoi(timeout)); + if (!TestShell::RunFileTest(params)) break; + + TestShell::SetFileTestTimeout(old_timeout_ms); } } else { params.test_url = WideToUTF8(uri).c_str(); |