WebKit Bugzilla
Attachment 165331 Details for
Bug 90968
: [NRWT] Pass --timeout to DRT/WTR if a test is marked as SLOW
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
draft patch
per_test_timeout_G.patch (text/plain), 6.89 KB, created by
János Badics
on 2012-09-24 01:54:11 PDT
(
hide
)
Description:
draft patch
Filename:
MIME Type:
Creator:
János Badics
Created:
2012-09-24 01:54:11 PDT
Size:
6.89 KB
patch
obsolete
>diff --git a/Tools/DumpRenderTree/DumpRenderTree.h b/Tools/DumpRenderTree/DumpRenderTree.h >index 4c6a472..9e66e6d 100644 >--- a/Tools/DumpRenderTree/DumpRenderTree.h >+++ b/Tools/DumpRenderTree/DumpRenderTree.h >@@ -64,13 +64,15 @@ extern RefPtr<TestRunner> gTestRunner; > > void dump(); > void displayWebView(); >+void setArgTimeout(); > > struct TestCommand { >- TestCommand() : shouldDumpPixels(false) { } >+ TestCommand() : shouldDumpPixels(false), timeout(30000) { } > > std::string pathOrURL; > bool shouldDumpPixels; > std::string expectedPixelHash; >+ int timeout; // in ms > }; > > TestCommand parseInputLine(const std::string&); >diff --git a/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp b/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp >index 48d8322..7a9f956 100644 >--- a/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp >+++ b/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp >@@ -66,17 +66,21 @@ TestCommand parseInputLine(const std::string& inputLine) > if (!tokenizer.hasNext()) > die(inputLine); > >- result.pathOrURL = tokenizer.next(); >- if (!tokenizer.hasNext()) >- return result; >- > std::string arg = tokenizer.next(); >- if (arg != std::string("-p") && arg != std::string("--pixel-test")) >- die(inputLine); >- result.shouldDumpPixels = true; > >- if (tokenizer.hasNext()) >- result.expectedPixelHash = tokenizer.next(); >+ result.pathOrURL = arg; >+ while (tokenizer.hasNext()) { >+ arg = tokenizer.next(); >+ if (arg == std::string("--timeout")) { >+ std::string timeoutToken = tokenizer.next(); >+ result.timeout = atoi(timeoutToken.c_str()); >+ } else if (arg == std::string("-p") || arg == std::string("--pixel-test")) { >+ result.shouldDumpPixels = true; >+ if (tokenizer.hasNext()) >+ result.expectedPixelHash = tokenizer.next(); >+ } else >+ die(inputLine); >+ } > > return result; > } >diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp >index be984e3..bcac773 100755 >--- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp >+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp >@@ -685,6 +685,12 @@ void DumpRenderTree::loadNextTestInStandAloneMode() > processLine(first); > } > >+void DumpRenderTree::setArgTimeout(int time) >+{ >+ if (time > 0) >+ DumpRenderTree::setTimeout(time); >+} >+ > void DumpRenderTree::processLine(const QString &input) > { > TestCommand command = parseInputLine(std::string(input.toLatin1().constData())); >@@ -717,6 +723,7 @@ void DumpRenderTree::processLine(const QString &input) > > open(QUrl::fromLocalFile(fi.absoluteFilePath())); > } >+ DumpRenderTree::setArgTimeout(command.timeout); > > fflush(stdout); > } >diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h >index 710f173..f30d616 100644 >--- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h >+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h >@@ -104,6 +104,7 @@ public: > void setRedirectErrorFileName(const QString& fileName) { m_redirectErrorFileName = fileName; } > > void setTimeout(int); >+ void setArgTimeout(int); > void setShouldTimeout(bool flag); > > public Q_SLOTS: >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py >index 8997a5f..e7cdf5d 100755 >--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py >@@ -148,6 +148,9 @@ class Port(object): > def additional_drt_flag(self): > return [] > >+ def supports_per_test_timeout(self): >+ return False >+ > def default_pixel_tests(self): > # FIXME: Disable until they are run by default on build.webkit.org. > return False >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/driver.py b/Tools/Scripts/webkitpy/layout_tests/port/driver.py >index 4bf53d4..d3a074d 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/port/driver.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/driver.py >@@ -148,7 +148,7 @@ class Driver(object): > the driver in an indeterminate state. The upper layers of the program > are responsible for cleaning up and ensuring things are okay. > >- Returns a DriverOuput object. >+ Returns a DriverOutput object. > """ > start_time = time.time() > self.start(driver_input.should_run_pixel_test, driver_input.args) >@@ -351,6 +351,8 @@ class Driver(object): > assert not driver_input.image_hash or driver_input.should_run_pixel_test > > # ' is the separator between arguments. >+ if self._port.supports_per_test_timeout(): >+ command += "'--timeout'%s" % driver_input.timeout > if driver_input.should_run_pixel_test: > command += "'--pixel-test" > if driver_input.image_hash: >diff --git a/Tools/Scripts/webkitpy/layout_tests/port/qt.py b/Tools/Scripts/webkitpy/layout_tests/port/qt.py >index 828a80d..e10efa9 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/port/qt.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/qt.py >@@ -80,6 +80,9 @@ class QtPort(Port): > # The Qt port builds DRT as part of the main build step > return True > >+ def supports_per_test_timeout(self): >+ return True >+ > def _path_to_driver(self): > return self._build_path('bin/%s' % self.driver_name()) > >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index 3da3880..52b42e9 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -526,11 +526,12 @@ bool TestController::resetStateToConsistentValues() > } > > struct TestCommand { >- TestCommand() : shouldDumpPixels(false) { } >+ TestCommand() : shouldDumpPixels(false), timeout(30000) { } > > std::string pathOrURL; > bool shouldDumpPixels; > std::string expectedPixelHash; >+ int timeout; > }; > > class CommandTokenizer { >@@ -592,17 +593,21 @@ TestCommand parseInputLine(const std::string& inputLine) > if (!tokenizer.hasNext()) > die(inputLine); > >- result.pathOrURL = tokenizer.next(); >- if (!tokenizer.hasNext()) >- return result; >- > std::string arg = tokenizer.next(); >- if (arg != std::string("-p") && arg != std::string("--pixel-test")) >- die(inputLine); >- result.shouldDumpPixels = true; > >- if (tokenizer.hasNext()) >- result.expectedPixelHash = tokenizer.next(); >+ result.pathOrURL = arg; >+ while (tokenizer.hasNext()) { >+ arg = tokenizer.next(); >+ if (arg == std::string("--timeout")) { >+ std::string timeoutToken = tokenizer.next(); >+ result.timeout = atoi(timeoutToken.c_str()); >+ } else if (arg == std::string("-p") || arg == std::string("--pixel-test")) { >+ result.shouldDumpPixels = true; >+ if (tokenizer.hasNext()) >+ result.expectedPixelHash = tokenizer.next(); >+ } else >+ die(inputLine); >+ } > > return result; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 90968
:
163359
|
163643
|
164136
|
165331
|
168204
|
172558
|
172596
|
175201
|
175356
|
176956