[GTK] Clear application cache between tests in DumpRenderTree
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 12:43:18 +0000 (12:43 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 12:43:18 +0000 (12:43 +0000)
commit325278919aa8ff2027beb8691fbab6fbebff56c5
tree2df637a7e73761bc9e765170cc6f35d5c040b957
parentaa10a88c9404d8867e892e0635984097e228038f
[GTK] Clear application cache between tests in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=96543

Reviewed by Philippe Normand.

Source/WebKit/gtk:

Add a method to the DumpRenderTreeSupportGtk class that upon calling
clears the application cache and vacuums the database file.

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::clearApplicationCache):
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Tools:

Call the new DumpRenderTreeSupportGtk method to clear application cache
after each test in DumpRenderTree.

Set the XDG_CACHE_HOME environment variable when running DumpRenderTree
as well. It's now being set in XvfbDriver._start so that each driver is assigned
a cache directory that's constructed out of the driver's name and its worker
number. These directories are located in the layout tests results directory.
At least on the builders this ensures a driver-specific empty cache directory
with each test run.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(runTest):
* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort.setup_environ_for_server):
* Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
(XvfbDriver._start):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@128596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Tools/ChangeLog
Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
Tools/Scripts/webkitpy/layout_tests/port/gtk.py
Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver.py