Add run-webkit-tests --print-expectations to show expectations for all or a subset of tests
Created attachment 287051 [details] Patch
Sample output: 282$ $ wktests --debug --print-expectations --ios-simulator -1 LayoutTests/fast/viewport/ios/ Found 9 tests; running 6, skipping 3. Tests to skip (3) fast/viewport/ios/force-always-user-scalable.html ['SKIP'] LayoutTests/TestExpectations:21 fast/viewport/ios [ Skip ] fast/viewport/ios/user-scalable-does-not-scale-for-keyboard-focus-with-author-defined-scale.html ['SKIP'] LayoutTests/TestExpectations:21 fast/viewport/ios [ Skip ] fast/viewport/ios/user-scalable-scales-for-keyboard-focus-with-no-author-defined-scale.html ['SKIP'] LayoutTests/TestExpectations:21 fast/viewport/ios [ Skip ] Tests to run (6) fast/viewport/ios/ipad/width-is-device-width.html ['PASS'] LayoutTests/platform/ios-simulator-wk1/TestExpectations:11 fast/viewport/ios/ipad/width-is-device-width.html [ Pass ] fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall.html ['PASS'] LayoutTests/platform/ios-simulator-wk1/TestExpectations:10 fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall.html [ Pass ] fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden.html ['PASS'] LayoutTests/platform/ios-simulator-wk1/TestExpectations:9 fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden.html [ Pass ] fast/viewport/ios/width-is-device-width-overflowing-no-shrink-to-fit.html ['PASS'] LayoutTests/platform/ios-simulator-wk1/TestExpectations:8 fast/viewport/ios/width-is-device-width-overflowing-no-shrink-to-fit.html [ Pass ] fast/viewport/ios/width-is-device-width-overflowing.html ['PASS'] LayoutTests/platform/ios-simulator-wk1/TestExpectations:7 fast/viewport/ios/width-is-device-width-overflowing.html [ Pass ] fast/viewport/ios/width-is-device-width.html ['PASS'] LayoutTests/platform/ios-simulator-wk1/TestExpectations:6 fast/viewport/ios/width-is-device-width.html [ Pass ] Tests to run for ipad (1) fast/viewport/ios/ipad/width-is-device-width.html ['PASS'] LayoutTests/platform/ios-simulator-wk1/TestExpectations:11 fast/viewport/ios/ipad/width-is-device-width.html [ Pass ]
Comment on attachment 287051 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287051&action=review > Tools/Scripts/webkitpy/layout_tests/controllers/manager.py:529 > + format_string = '{lb}:{width}{rb} {lb}{rb} {lb}{rb} {lb}{rb}'.format(lb='{', rb='}', width=test_col_width) Why don't we just hard use {{ and }} instead? ({{ would format as {). > Tools/Scripts/webkitpy/layout_tests/controllers/manager.py:536 > + line = self._expectations.model().get_expectation_line(test) > + print format_string.format(test, line.expected_behavior, self._expectations.readable_filename_and_line_number(line), line.original_string) Can we just define a helper function to share this code between here and the loop below? You can even create a lambda function in this function and call it.
https://trac.webkit.org/changeset/205080