Changeset 252948 in webkit
- Timestamp:
- Nov 29, 2019 10:54:17 AM (4 years ago)
- Location:
- trunk/Tools
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r252946 r252948 1 2019-11-29 Antti Koivisto <antti@apple.com> 2 3 Add mechanism for enabling internal and experimental features from run-webkit-test command line 4 https://bugs.webkit.org/show_bug.cgi?id=204702 5 6 Reviewed by Antoine Quint. 7 8 Add --internal-feature and --experimental-feature flags to TestRunner and run-webkit-tests. 9 This is useful for running existing tests with different feature enabled without modifying 10 anything else. For example: 11 12 run-webkit-tests --internal-feature LayoutFormattingContextRenderTreeIntegrationEnabled 13 14 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 15 (parse_args): 16 * Scripts/webkitpy/port/base.py: 17 (Port.internal_feature): 18 (Port): 19 (Port.experimental_feature): 20 * Scripts/webkitpy/port/driver.py: 21 (Driver.cmd_line): 22 * WebKitTestRunner/Options.cpp: 23 (WTR::handleOptionExperimentalFeature): 24 (WTR::handleOptionInternalFeature): 25 (WTR::OptionsHandler::OptionsHandler): 26 * WebKitTestRunner/Options.h: 27 * WebKitTestRunner/TestController.cpp: 28 (WTR::TestController::initialize): 29 (WTR::TestController::testOptionsForTest const): 30 * WebKitTestRunner/TestController.h: 31 1 32 2019-11-29 Aakash Jain <aakash_jain@apple.com> 2 33 -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r252711 r252948 119 119 optparse.make_option("--remote-layer-tree", action="store_true", default=False, 120 120 help="Use the remote layer tree drawing model (OS X WebKit2 only)"), 121 optparse.make_option("--internal-feature", type="string", action="append", 122 default=[], help="Enable internal feature"), 123 optparse.make_option("--experimental-feature", type="string", action="append", 124 default=[], help="Enable experimental feature"), 121 125 ])) 122 126 -
trunk/Tools/Scripts/webkitpy/port/base.py
r252714 r252948 1194 1194 return self.get_option("allowed_host", []) 1195 1195 1196 def internal_feature(self): 1197 return self.get_option("internal_feature", []) 1198 1199 def experimental_feature(self): 1200 return self.get_option("experimental_feature", []) 1201 1196 1202 def default_configuration(self): 1197 1203 return self._config.default_configuration() -
trunk/Tools/Scripts/webkitpy/port/driver.py
r249965 r252948 524 524 cmd.append(allowed_host) 525 525 526 for feature in self._port.internal_feature(): 527 cmd.append('--internal-feature') 528 cmd.append(feature) 529 530 for feature in self._port.experimental_feature(): 531 cmd.append('--experimental-feature') 532 cmd.append(feature) 533 526 534 cmd.extend(self._port.get_option('additional_drt_flag', [])) 527 535 cmd.extend(self._port.additional_drt_flag()) -
trunk/Tools/WebKitTestRunner/Options.cpp
r245733 r252948 106 106 } 107 107 108 static bool handleOptionExperimentalFeature(Options& options, const char*, const char* feature) 109 { 110 options.experimentalFeatures.insert(feature); 111 return true; 112 } 113 114 static bool handleOptionInternalFeature(Options& options, const char*, const char* feature) 115 { 116 options.internalFeatures.insert(feature); 117 return true; 118 } 119 108 120 static bool handleOptionUnmatched(Options& options, const char* option, const char*) 109 121 { … … 130 142 optionList.append(Option("--show-touches", "Show the touches during test runs (for debugging)", handleOptionShowTouches)); 131 143 optionList.append(Option("--world-leaks", "Check for leaks of world objects (currently, documents)", handleOptionCheckForWorldLeaks)); 144 optionList.append(Option("--experimental-feature", "Enable experimental feature", handleOptionExperimentalFeature, true)); 145 optionList.append(Option("--internal-feature", "Enable internal feature", handleOptionInternalFeature, true)); 132 146 133 147 optionList.append(Option(0, 0, handleOptionUnmatched)); -
trunk/Tools/WebKitTestRunner/Options.h
r245733 r252948 52 52 std::vector<std::string> paths; 53 53 std::set<std::string> allowedHosts; 54 std::set<std::string> internalFeatures; 55 std::set<std::string> experimentalFeatures; 54 56 }; 55 57 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r252840 r252948 473 473 m_checkForWorldLeaks = options.checkForWorldLeaks; 474 474 m_allowAnyHTTPSCertificateForAllowedHosts = options.allowAnyHTTPSCertificateForAllowedHosts; 475 m_internalFeatures = options.internalFeatures; 476 m_experimentalFeatures = options.experimentalFeatures; 475 477 476 478 m_usingServerMode = (m_paths.size() == 1 && m_paths[0] == "-"); … … 1454 1456 options.shouldShowWebView = m_shouldShowWebView; 1455 1457 1458 for (auto& feature : m_internalFeatures) 1459 options.internalDebugFeatures.add(feature.c_str(), true); 1460 for (auto& feature : m_experimentalFeatures) 1461 options.experimentalFeatures.add(feature.c_str(), true); 1462 1456 1463 updatePlatformSpecificTestOptionsForTest(options, command.pathOrURL); 1457 1464 updateTestOptionsFromTestHeader(options, command.pathOrURL, command.absolutePath); -
trunk/Tools/WebKitTestRunner/TestController.h
r252840 r252948 501 501 std::vector<std::string> m_paths; 502 502 std::set<std::string> m_allowedHosts; 503 std::set<std::string> m_internalFeatures; 504 std::set<std::string> m_experimentalFeatures; 505 503 506 WKRetainPtr<WKStringRef> m_injectedBundlePath; 504 507 WKRetainPtr<WKStringRef> m_testPluginDirectory; … … 573 576 574 577 bool m_allowAnyHTTPSCertificateForAllowedHosts { false }; 575 578 576 579 bool m_shouldDecideNavigationPolicyAfterDelay { false }; 577 580 bool m_shouldDecideResponsePolicyAfterDelay { false };
Note: See TracChangeset
for help on using the changeset viewer.