[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Python tests: don't create working copy when it isn't needed

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: 2006-05-13 16:22:23 CEST


I encountered some situations on the python tests where a working copy is
created during sbox_build(), but the working copy afterwards is never used
in that test. For performance reasons, I'd like to remove this situations.

Attached patch provides an option in sbox.build() that - when set - disables
the creation of the working copy.

A search through all the python tests showed me that the working copy is not
used (but created) in these tests:
basic_tests.py: uri_syntax
cat_tests.py: cat_remote_directory
copy_tests.py: double_uri_escaping_1814, copy_to_root,
url_to_non_existent_url_path, non_existent_url_to_url, old_dir_url_to_url
diff_tests.py: diff_nonextant_urls
export_tests.py: export_empty_directory, export_greek_tree
externals_tests.py: externals_test_setup
svnadmin_tests.py: dump_quiet
authz_tests.py: broken_authz_file, authz_read_access,
authz_write_access, authz_checkout_test

So I changed all those python test files and updated the tests.

One strange issue that I encountered during this change, is that while 'svn
co working_copies/export_tests_1' creates the intermediate working_copies
folder, 'svn export working_copies/export_tests_1' doesn't. I'd expect
consistency between checkout and export here. Is that a bug?

I ran the tests successfully locally and run the patch on my mac buildslave.


Improve performance of the python tests by not creating a working copy when
none is needed.
Updated copyright date of the tests to 2006 where needed.

Patch by: Lieven Govaerts <lgo@mobsol.be>

* subversion/tests/cmdline/svntest/main.py
  (Sandbox.build): Allow the user to pass an option to disable the creation
of a working copy.

* subversion/tests/cmdline/svntest/actions.py
  (make_repo_and_wc): When create_wc option is False do not checkout the
working copy.
  Make sure the svn-test-work/working_copies folder is created

The following tests are all changed to not request a working copy to be
* subversion/tests/cmdline/basic_tests.py
* subversion/tests/cmdline/cat_tests.py
* subversion/tests/cmdline/copy_tests.py
* subversion/tests/cmdline/diff_tests.py
* subversion/tests/cmdline/export_tests.py
* subversion/tests/cmdline/externals_tests.py
* subversion/tests/cmdline/svnadmin_tests.py
* subversion/tests/cmdline/authz_tests.py

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sat May 13 16:26:42 2006

This is an archived mail posted to the Subversion Dev mailing list.