diff options
author | dimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 19:13:29 +0000 |
---|---|---|
committer | dimich@google.com <dimich@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 19:13:29 +0000 |
commit | dbfd2ef498e4cad22a523fe0a4f233b9e076018c (patch) | |
tree | 74989f53d5b55cfaa822146d5d21ad78d20bc617 /webkit | |
parent | a7614aa866244dd3115ebb407e8b4b7e04a79388 (diff) | |
download | chromium_src-dbfd2ef498e4cad22a523fe0a4f233b9e076018c.zip chromium_src-dbfd2ef498e4cad22a523fe0a4f233b9e076018c.tar.gz chromium_src-dbfd2ef498e4cad22a523fe0a4f233b9e076018c.tar.bz2 |
Remove old log files so they don't accumulate on try bots.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/149263
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/tools/layout_tests/layout_package/http_server.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/webkit/tools/layout_tests/layout_package/http_server.py b/webkit/tools/layout_tests/layout_package/http_server.py index b839385..fc7f72c 100644 --- a/webkit/tools/layout_tests/layout_package/http_server.py +++ b/webkit/tools/layout_tests/layout_package/http_server.py @@ -25,6 +25,13 @@ THISDIR = os.path.dirname(os.path.abspath(__file__)) def PathFromBase(*pathies): return google.path_utils.FindUpward(THISDIR, *pathies) +def RemoveLogFiles(folder, starts_with): + files = os.listdir(folder) + for file in files: + if file.startswith(starts_with) : + full_path = os.path.join(folder, file) + os.remove(full_path) + class HttpdNotStarted(Exception): pass @@ -104,6 +111,10 @@ class Lighttpd: log_file_name = "error.log-" + time_str + ".txt" error_log = os.path.join(self._output_dir, log_file_name) + # Remove old log files. We only need to keep the last ones. + RemoveLogFiles(self._output_dir, "access.log-") + RemoveLogFiles(self._output_dir, "error.log-") + # Write out the config f = file(base_conf_file, 'rb') base_conf = f.read() |