Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 341059: Changes the layout test formatter to apply lenient permissions on created fil... (Closed)

Created:
11 years, 1 month ago by Glenn Wilson
Modified:
9 years, 7 months ago
Reviewers:
ojan
CC:
chromium-reviews_googlegroups.com, darin (slow to review), pam+watch_chromium.org
Visibility:
Public.

Description

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

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M webkit/tools/layout_tests/layout_package/failure_finder.py View 4 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Glenn Wilson
11 years, 1 month ago (2009-11-02 22:42:07 UTC) #1
ojan
11 years, 1 month ago (2009-11-02 22:49:29 UTC) #2
LGTM

On Mon, Nov 2, 2009 at 2:42 PM, <gwilson@chromium.org> wrote:

> Reviewers: ojan,
>
> Description:
> 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
>
>
>
> Please review this at http://codereview.chromium.org/341059
>
> SVN Base: svn://chrome-svn/chrome/trunk/src/
>
> Affected files:
>  M     webkit/tools/layout_tests/layout_package/failure_finder.py
>
>
> Index: webkit/tools/layout_tests/layout_package/failure_finder.py
> ===================================================================
> --- webkit/tools/layout_tests/layout_package/failure_finder.py  (revision
> 29832)
> +++ webkit/tools/layout_tests/layout_package/failure_finder.py  (working
> copy)
> @@ -142,7 +142,7 @@
>   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 @@
>         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 @@
>       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 @@
>       localFile.write(webFile.read())
>       webFile.close()
>       localFile.close()
> +      os.chmod(local_filename, 0777)
>     except urllib2.HTTPError:
>       return None
>     except urllib2.URLError:
>
>
>

Powered by Google App Engine
This is Rietveld 408576698