Changeset 285168 in webkit
- Timestamp:
- Nov 2, 2021, 10:50:02 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 8 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkitpy/layout_tests/controllers/single_test_runner.py (modified) (1 diff)
-
Scripts/webkitpy/port/driver.py (modified) (3 diffs)
-
TestRunnerShared/TestCommand.cpp (modified) (1 diff)
-
TestRunnerShared/TestCommand.h (modified) (1 diff)
-
WebKitTestRunner/TestController.cpp (modified) (1 diff)
-
WebKitTestRunner/TestInvocation.cpp (modified) (1 diff)
-
WebKitTestRunner/TestInvocation.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r285163 r285168 1 2021-11-02 Tim Horton <timothy_horton@apple.com> 2 3 dumpAsText() tests don't get the ref-test treatment when using --self-compare-with-header 4 https://bugs.webkit.org/show_bug.cgi?id=232611 5 6 Reviewed by Jonathan Bedard. 7 8 One oversight in r285132: a test can disable pixel dumping by calling 9 dumpAsText(). This causes --self-compare-with-header to fall over because 10 it expects every test to have pixel results (and that is the whole point). 11 12 Add an un-overrideable `--force-dump-pixels` TestCommand argument, 13 and adopt it for self-comparison tests. 14 15 * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: 16 (SingleTestRunner._run_self_comparison_test): 17 * Scripts/webkitpy/port/driver.py: 18 (DriverInput.__init__): 19 (DriverInput.__repr__): 20 (Driver._command_from_driver_input): 21 * TestRunnerShared/TestCommand.cpp: 22 (WTR::parseInputLine): 23 * TestRunnerShared/TestCommand.h: 24 * WebKitTestRunner/TestController.cpp: 25 (WTR::TestController::runTest): 26 * WebKitTestRunner/TestInvocation.cpp: 27 (WTR::TestInvocation::dumpResults): 28 (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): 29 * WebKitTestRunner/TestInvocation.h: 30 1 31 2021-11-02 Kate Cheney <katherine_cheney@apple.com> 2 32 -
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
r285132 r285168 343 343 driver_input = self._driver_input() 344 344 driver_input.should_run_pixel_test = True 345 driver_input.force_dump_pixels = True 345 346 346 347 reference_output = self._driver.run_test(driver_input, self._stop_when_done) -
trunk/Tools/Scripts/webkitpy/port/driver.py
r285132 r285168 47 47 48 48 class DriverInput(object): 49 def __init__(self, test_name, timeout, image_hash, should_run_pixel_test, should_dump_jsconsolelog_in_stderr=None, args=None, self_comparison_header=None ):49 def __init__(self, test_name, timeout, image_hash, should_run_pixel_test, should_dump_jsconsolelog_in_stderr=None, args=None, self_comparison_header=None, force_dump_pixels=False): 50 50 self.test_name = test_name 51 51 self.timeout = timeout # in ms … … 55 55 self.args = args or [] 56 56 self.self_comparison_header = self_comparison_header 57 self.force_dump_pixels = force_dump_pixels 57 58 58 59 def __repr__(self): 59 return "DriverInput(test_name='{}', timeout={}, image_hash={}, should_run_pixel_test={}, should_dump_jsconsolelog_in_stderr={}, self_comparison_header={} '".format(self.test_name, self.timeout, self.image_hash, self.should_run_pixel_test, self.should_dump_jsconsolelog_in_stderr, self.self_comparison_header)60 return "DriverInput(test_name='{}', timeout={}, image_hash={}, should_run_pixel_test={}, should_dump_jsconsolelog_in_stderr={}, self_comparison_header={}, force_dump_pixels={}'".format(self.test_name, self.timeout, self.image_hash, self.should_run_pixel_test, self.should_dump_jsconsolelog_in_stderr, self.self_comparison_header, self.force_dump_pixels) 60 61 61 62 … … 637 638 if driver_input.self_comparison_header: 638 639 command += "'--self-compare-with-header'%s" % driver_input.self_comparison_header 640 if driver_input.force_dump_pixels: 641 command += "'--force-dump-pixels" 639 642 640 643 # --pixel-test must be the last argument, because the hash is optional, -
trunk/Tools/TestRunnerShared/TestCommand.cpp
r285132 r285168 108 108 else if (arg == std::string("--absolutePath")) 109 109 result.absolutePath = tokenizer.next(); 110 else if (arg == "--force-dump-pixels") 111 result.forceDumpPixels = true; 110 112 else 111 113 die(inputLine); -
trunk/Tools/TestRunnerShared/TestCommand.h
r285132 r285168 39 39 WTF::Seconds timeout; 40 40 bool shouldDumpPixels { false }; 41 bool forceDumpPixels { false }; 41 42 bool dumpJSConsoleLogInStdErr { false }; 42 43 }; -
trunk/Tools/WebKitTestRunner/TestController.cpp
r285132 r285168 1481 1481 m_currentInvocation->setIsPixelTest(command.expectedPixelHash); 1482 1482 1483 if (command.forceDumpPixels) 1484 m_currentInvocation->setForceDumpPixels(true); 1485 1483 1486 if (command.timeout > 0_s) 1484 1487 m_currentInvocation->setCustomTimeout(command.timeout); -
trunk/Tools/WebKitTestRunner/TestInvocation.cpp
r284610 r285168 830 830 831 831 if (WKStringIsEqualToUTF8CString(messageName, "SetDumpPixels")) { 832 m_dumpPixels = booleanValue(messageBody) ;832 m_dumpPixels = booleanValue(messageBody) || m_forceDumpPixels; 833 833 return nullptr; 834 834 } -
trunk/Tools/WebKitTestRunner/TestInvocation.h
r282103 r285168 52 52 53 53 void setIsPixelTest(const std::string& expectedPixelHash); 54 void setForceDumpPixels(bool forceDumpPixels) { m_forceDumpPixels = forceDumpPixels; } 54 55 55 56 void setCustomTimeout(Seconds duration) { m_timeout = duration; } … … 165 166 bool m_dumpFrameLoadCallbacks { false }; 166 167 bool m_dumpPixels { false }; 168 bool m_forceDumpPixels { false }; 167 169 bool m_pixelResultIsPending { false }; 168 170 bool m_shouldDumpResourceLoadStatistics { false };
Note:
See TracChangeset
for help on using the changeset viewer.