From 1d61ddd4bac2de7d322fc9a5580e8aab9da79c74 Mon Sep 17 00:00:00 2001 From: "gwilson@google.com" Date: Mon, 2 Nov 2009 23:17:30 +0000 Subject: Changes the layout test formatter to apply lenient permissions on created files. This is so buildbots can easily scp these files to the right place and clean them up. R=ojan TEST=run test_output_formatter.sh, all created files should be rwxrwxrwx BUG=none Review URL: http://codereview.chromium.org/341059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30763 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/tools/layout_tests/layout_package/failure_finder.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'webkit/tools/layout_tests/layout_package') diff --git a/webkit/tools/layout_tests/layout_package/failure_finder.py b/webkit/tools/layout_tests/layout_package/failure_finder.py index dbcab94..4f15659 100644 --- a/webkit/tools/layout_tests/layout_package/failure_finder.py +++ b/webkit/tools/layout_tests/layout_package/failure_finder.py @@ -142,7 +142,7 @@ def CreateDirectory(dir): This will create directories recursively until the given dir exists. """ if not os.path.exists(dir): - os.makedirs(dir) + os.makedirs(dir, 0777) def ExtractFirstValue(string, regex): m = re.search(regex, string) @@ -452,13 +452,14 @@ class FailureFinder(object): extracted_file_path = os.path.join(base_dir, name) try: (path, filename) = os.path.split(extracted_file_path) - os.makedirs(path) + os.makedirs(path, 0777) except: pass outfile = open(extracted_file_path, 'wb') outfile.write(zip.read(name)) outfile.flush() outfile.close() + os.chmod(extracted_file_path, 0777) def _GetRevisionAndBuildFromArchiveStep(self): if self.archive_step_log_file: @@ -789,6 +790,7 @@ class FailureFinder(object): localFile = open(file_to_create, "w%s" % modifiers) localFile.write(zip.read(file_in_zip)) localFile.close() + os.chmod(file_to_create, 0777) return True except KeyError: print "File %s does not exist in zip file." % (file_in_zip) @@ -818,6 +820,7 @@ class FailureFinder(object): localFile.write(webFile.read()) webFile.close() localFile.close() + os.chmod(local_filename, 0777) except urllib2.HTTPError: return None except urllib2.URLError: -- cgit v1.1