Mavericks: Media tests start to time out after a few days of bot uptime
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2015 19:28:55 +0000 (19:28 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2015 19:28:55 +0000 (19:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149468

Reviewed by Chris Dumez.

* Scripts/webkitpy/port/base.py:
* Scripts/webkitpy/port/driver.py:
* Scripts/webkitpy/port/mac.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190127 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/port/base.py
Tools/Scripts/webkitpy/port/driver.py
Tools/Scripts/webkitpy/port/mac.py

index 77a965b21a07a4dceed2f084a26d08161df17fd2..b2999a8465f20b9839bc0a406295519b1cfc6a77 100644 (file)
@@ -1,3 +1,14 @@
+2015-09-22  Alexey Proskuryakov  <ap@apple.com>
+
+        Mavericks: Media tests start to time out after a few days of bot uptime
+        https://bugs.webkit.org/show_bug.cgi?id=149468
+
+        Reviewed by Chris Dumez.
+
+        * Scripts/webkitpy/port/base.py:
+        * Scripts/webkitpy/port/driver.py:
+        * Scripts/webkitpy/port/mac.py:
+
 2015-09-22  Nan Wang  <n_wang@apple.com>
 
         Unreviewed, add myself to the committers list.
index e8e2f54eea4ca7d36333b960af33eaf693d22476..1cc2089eedeab72de1a795b223ca17336ec8a0d9 100644 (file)
@@ -853,6 +853,9 @@ class Port(object):
 
         return clean_env
 
+    def _clear_global_caches_and_temporary_files(self):
+        pass
+
     @staticmethod
     def _append_value_colon_separated(env, name, value):
         assert ":" not in value
index 0238bd918c78c4fdd3691068dadf1d22777438e2..e647326c385eb1be09e4970bbd7c73d40d096d46 100644 (file)
@@ -328,6 +328,9 @@ class Driver(object):
 
     def _start(self, pixel_tests, per_test_args):
         self.stop()
+        # Each driver process should be using individual directories under _driver_tempdir (which is deleted when stopping),
+        # however some subsystems on some platforms could end up using process default ones.
+        self._port._clear_global_caches_and_temporary_files()
         self._driver_tempdir = self._port._driver_tempdir()
         server_name = self._port.driver_name()
         environment = self._port.setup_environ_for_server(server_name)
index 0c5bfe99cfe353272bec8b121ed418dfbc7909ae..dcf6053e96f7ee5317df108057ea78c954cd8c76 100644 (file)
@@ -107,6 +107,13 @@ class MacPort(ApplePort):
         env['XML_CATALOG_FILES'] = ''  # work around missing /etc/catalog <rdar://problem/4292995>
         return env
 
+    def _clear_global_caches_and_temporary_files(self):
+        self._filesystem.rmtree('/private/tmp/MediaCache')
+        self._filesystem.rmtree(os.path.expanduser('~/Library/' + self.driver_name()))
+        self._filesystem.rmtree(os.path.expanduser('~/Library/Application Support/' + self.driver_name()))
+        self._filesystem.rmtree(os.path.expanduser('~/Library/Caches/' + self.driver_name()))
+        self._filesystem.rmtree(os.path.expanduser('~/Library/WebKit/' + self.driver_name()))
+
     def operating_system(self):
         return 'mac'