WebKit Bugzilla
Attachment 164136 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_E.patch (text/plain), 4.92 KB, created by
János Badics
on 2012-09-14 07:05:55 PDT
(
hide
)
Description:
draft patch
Filename:
MIME Type:
Creator:
János Badics
Created:
2012-09-14 07:05:55 PDT
Size:
4.92 KB
patch
obsolete
>diff --git a/Tools/DumpRenderTree/DumpRenderTree.h b/Tools/DumpRenderTree/DumpRenderTree.h >index 4c6a472..50c86ba 100644 >--- a/Tools/DumpRenderTree/DumpRenderTree.h >+++ b/Tools/DumpRenderTree/DumpRenderTree.h >@@ -64,13 +64,15 @@ extern RefPtr<TestRunner> gTestRunner; > > void dump(); > void displayWebView(); >+void readTimeout(); > > 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..29d2fa4 100644 >--- a/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp >+++ b/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp >@@ -66,17 +66,22 @@ 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..5f0aa66 100755 >--- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp >+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp >@@ -685,6 +685,12 @@ void DumpRenderTree::loadNextTestInStandAloneMode() > processLine(first); > } > >+void DumpRenderTree::readTimeout(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::readTimeout(command.timeout); > > fflush(stdout); > } >diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h >index 710f173..c1c4dfe 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 readTimeout(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..7e59df4 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/port/driver.py >+++ b/Tools/Scripts/webkitpy/layout_tests/port/driver.py >@@ -351,6 +351,9 @@ 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" >+ command += "'" + str(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()) >
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