Changeset 84534 in webkit
- Timestamp:
- Apr 21, 2011 12:08:53 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r84525 r84534 1 2011-04-21 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Simon Fraser. 4 5 Add way to garbage collect between each test when running layout tests 6 https://bugs.webkit.org/show_bug.cgi?id=59126 7 8 * DumpRenderTree/mac/DumpRenderTree.mm: 9 (initializeGlobalsFromCommandLineOptions): 10 (runTest): 11 * Scripts/old-run-webkit-tests: 12 * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: 13 (WTR::InjectedBundle::didReceiveMessage): 14 * WebKitTestRunner/TestController.cpp: 15 (WTR::TestController::TestController): 16 (WTR::TestController::initialize): 17 (WTR::TestController::resetStateToConsistentValues): 18 * WebKitTestRunner/TestController.h: 19 1 20 2011-04-21 Ojan Vafai <ojan@chromium.org> 2 21 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r84104 r84534 143 143 static int dumpTree = YES; 144 144 static int forceComplexText; 145 static int gcBetweenTests; 145 146 static BOOL printSeparators; 146 147 static RetainPtr<CFStringRef> persistentUserStyleSheetLocation; … … 587 588 {"threaded", no_argument, &threaded, YES}, 588 589 {"complex-text", no_argument, &forceComplexText, YES}, 590 {"gc-between-tests", no_argument, &gcBetweenTests, YES}, 589 591 {NULL, 0, NULL, 0} 590 592 }; … … 1203 1205 if (ignoreWebCoreNodeLeaks) 1204 1206 [WebCoreStatistics stopIgnoringWebCoreNodeLeaks]; 1207 1208 if (gcBetweenTests) 1209 [WebCoreStatistics garbageCollectJavaScriptObjects]; 1205 1210 } 1206 1211 -
trunk/Tools/Scripts/old-run-webkit-tests
r84377 r84534 167 167 my $testsPerDumpTool = 1000; 168 168 my $threaded = 0; 169 my $gcBetweenTests = 0; 169 170 # DumpRenderTree has an internal timeout of 30 seconds, so this must be > 30. 170 171 my $timeoutSeconds = 35; … … 282 283 --complex-text Use the complex text code path for all text (Mac OS X and Windows only) 283 284 -c|--configuration config Set DumpRenderTree build configuration 285 --gc-between-tests Force garbage collection between each test 284 286 -g|--guard-malloc Enable malloc guard 285 287 --exit-after-n-failures N Exit after the first N failures (includes crashes) instead of running all tests … … 332 334 'exit-after-n-failures=i' => \$exitAfterNFailures, 333 335 'exit-after-n-crashes-or-timeouts=i' => \$exitAfterNCrashesOrTimeouts, 336 'gc-between-tests' => \$gcBetweenTests, 334 337 'guard-malloc|g' => \$guardMalloc, 335 338 'help|h' => \$showHelp, … … 644 647 push @toolArgs, "--threaded" if $threaded; 645 648 push @toolArgs, "--complex-text" if $complexText; 649 push @toolArgs, "--gc-between-tests" if $gcBetweenTests; 646 650 push @toolArgs, "-"; 647 651 -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
r82649 r84534 142 142 return; 143 143 } else if (WKStringIsEqualToUTF8CString(messageName, "Reset")) { 144 ASSERT(messageBody); 145 ASSERT(WKGetTypeID(messageBody) == WKDictionaryGetTypeID()); 146 WKDictionaryRef messageBodyDictionary = static_cast<WKDictionaryRef>(messageBody); 147 148 WKRetainPtr<WKStringRef> shouldGCKey(AdoptWK, WKStringCreateWithUTF8CString("ShouldGC")); 149 bool shouldGC = WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(messageBodyDictionary, shouldGCKey.get()))); 150 151 if (shouldGC) 152 WKBundleGarbageCollectJavaScriptObjects(m_bundle); 153 144 154 m_state = Idle; 145 155 m_dumpPixels = false; -
trunk/Tools/WebKitTestRunner/TestController.cpp
r84206 r84534 30 30 #include "StringFunctions.h" 31 31 #include "TestInvocation.h" 32 #include <cstdio>33 32 #include <WebKit2/WKContextPrivate.h> 33 #include <WebKit2/WKNumber.h> 34 34 #include <WebKit2/WKPageGroup.h> 35 35 #include <WebKit2/WKPreferencesPrivate.h> 36 36 #include <WebKit2/WKRetainPtr.h> 37 #include <cstdio> 37 38 #include <wtf/PassOwnPtr.h> 38 39 … … 61 62 , m_printSeparators(false) 62 63 , m_usingServerMode(false) 64 , m_gcBetweenTests(false) 63 65 , m_state(Initial) 64 66 , m_doneResetting(false) … … 216 218 continue; 217 219 } 220 if (argument == "--gc-between-tests") { 221 m_gcBetweenTests = true; 222 continue; 223 } 218 224 if (argument == "--print-supported-features") { 219 225 printSupportedFeatures = true; … … 349 355 m_state = Resetting; 350 356 351 WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("Reset")); 352 WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), 0); 357 WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("Reset")); 358 WKRetainPtr<WKMutableDictionaryRef> resetMessageBody = adoptWK(WKMutableDictionaryCreate()); 359 360 WKRetainPtr<WKStringRef> shouldGCKey = adoptWK(WKStringCreateWithUTF8CString("ShouldGC")); 361 WKRetainPtr<WKBooleanRef> shouldGCValue = adoptWK(WKBooleanCreate(m_gcBetweenTests)); 362 WKDictionaryAddItem(resetMessageBody.get(), shouldGCKey.get(), shouldGCValue.get()); 363 364 WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), resetMessageBody.get()); 353 365 354 366 // FIXME: This function should also ensure that there is only one page open. -
trunk/Tools/WebKitTestRunner/TestController.h
r80009 r84534 100 100 bool m_printSeparators; 101 101 bool m_usingServerMode; 102 bool m_gcBetweenTests; 102 103 std::vector<std::string> m_paths; 103 104 WKRetainPtr<WKStringRef> m_injectedBundlePath;
Note: See TracChangeset
for help on using the changeset viewer.