[webkit-reviews] review granted: [Bug 63883] Make SCM unit tests faster : [Attachment 99653] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 6 11:35:55 PDT 2011


Eric Seidel <eric at webkit.org> has granted Daniel Bates <dbates at webkit.org>'s
request for review:
Bug 63883: Make SCM unit tests faster
https://bugs.webkit.org/show_bug.cgi?id=63883

Attachment 99653: Patch
https://bugs.webkit.org/attachment.cgi?id=99653&action=review

------- Additional Comments from Eric Seidel <eric at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=99653&action=review

> Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py:75
> +# We cache the mock SVN repo so that we don't create it again for each call
to an SVNTest or GitTest test_ method.
> +# We store it in a global variable so that we can delete this cached repo on
exit(3).
> +cached_svn_repo_path = None
> +
> +
> +def remove_dir(path):
> +    # Change directory to / to ensure that we aren't in the directory we
want to delete.
> +    os.chdir('/')
> +    shutil.rmtree(path)
> +
> +
> + at atexit.register
> +def delete_cached_mock_repo_at_exit():
> +    if cached_svn_repo_path:
> +	   remove_dir(cached_svn_repo_path)

Just add a FIXME That this all goes away when we move to 2.7.  LGTM.


More information about the webkit-reviews mailing list