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

Re: [PATCH] input_validation_tests.py: Reduce overhead of multiple checkouts.

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: Sun, 27 Feb 2011 16:11:46 +0100

On Sun, Feb 27, 2011 at 3:38 PM, Noorul Islam K M <noorul_at_collab.net> wrote:

> Lieven Govaerts <svnlgo_at_mobsol.be> writes:
>
> > On Sun, Feb 27, 2011 at 6:02 AM, Noorul Islam K M <noorul_at_collab.net>
> wrote:
> >
> >> Noorul Islam K M <noorul_at_collab.net> writes:
> >>
> >> Since svntest.main.run_tests already run "svnadmin create" and "svn
> >> import", in this particular case of input_validation_tests we don't need
> >> to create wc. So I passed create_wc = False to sbox.build() and
> >> everything works fine. So no overhead of repeated checkouts. Here is the
> >> patch.
> >
> >
> >
> >> Log
> >>
> >> [[[
> >>
> >> Pass "create_wc = False" to sbox.build() in order reduce the overhead of
> >> repeated checkouts.
> >>
> >> * subversion/tests/cmdline/input_validation_tests.py
> >> (invalid_wcpath_add, invalid_wcpath_changelist,
> >> invalid_wcpath_cleanup, invalid_wcpath_commit, invalid_copy_sources,
> >> invalid_copy_target, invalid_delete_targets, invalid_diff_targets,
> >> invalid_export_targets, invalid_import_rags, invalid_log_targets,
> >> invalid_merge_rags, invalid_wcpath_upgrade, invalid_resolve_targets,
> >> invalid_resolved_targets, invalid_revert_targets,
> >> invalid_lock_targets, invalid_unlock_targets, invalid_status_targets,
> >> invalid_patch_targets, invalid_switch_targets,
> >> invalid_relocate_targets, invalid_mkdir_targets,
> >> invalid_update_targets): Pass "create_wc = False" to sbox.build()
> >>
> >> Patch by: Noorul Islam K M <noorul{_AT_}collab.net>
> >> ]]]
> >>
> >> Thanks and Regards
> >> Noorul
> >>
> >>
> >> Index: subversion/tests/cmdline/input_validation_tests.py
> >> ===================================================================
> >> --- subversion/tests/cmdline/input_validation_tests.py (revision
> 1074971)
> >> +++ subversion/tests/cmdline/input_validation_tests.py (working copy)
> >> @@ -66,13 +66,13 @@
> >>
> >> def invalid_wcpath_add(sbox):
> >> "non-working copy paths for 'add'"
> >> - sbox.build(read_only=True)
> >> + sbox.build(create_wc = False)
> >> for target in _invalid_wc_path_targets:
> >> run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'add',
> >> target)
> >>
> >>
> > I don't get this patch.
> >
> > The tests are supposed to be run from inside a working copy. After
> applying
> > this patch no wc isn't created, so they're not testing the same thing
> > anymore.
> >
> > If I apply this patch on a trunk wc, I get errors for all the tests:
> >
> > OSError: [Errno 2] No such file or directory:
> > 'svn-test-work/working_copies/input_validation_tests-17'
> > FAIL: input_validation_tests.py 17: wc paths and repo URL target mixture
> > for 'lock'
> >
> > [..]
> >
>
> I re-applied this patch and ran against trunk code. All tests pass. Can
> someone else try this patch please?
>

Did you clean up your svn-test-work folder before running the tests?

> You'll need at least one working copy, so either use the approach I've
> > outlined in a previous mail, or create one global sandbox and pass that
> in
> > the calls to run_and_verify_svn_in_wc.
> >
>
> I agree and I observed that svntest.main.run_tests runs "svnadmin
> create" and "svn import" command to create greek tree structure. Doesn't
> that create a working copy?
>

No. The test framework creates the greek tree on disc
in svn-test-work/local_tmp/greekfiles, then creates a new repository in
svn-test-work/local_tmp/repos (svnadmin create) and imports the greek tree
in that repository (svn import).

If you comment out the last lines of svntest/main.py, run the tests and then
open svn-test-work/local_tmp, you'll find the greek tree and repository, so
you can see for yourself.

Thanks and Regards
> Noorul
>
> > In fact, looking a bit more deeply in the test code, I think you should
> > leave the current one-wc-per-test behavior as is. Why? Because the tests
> > aren't guaranteed to be read only. Take for instance test
> > invalid_copy_target. If that copy operation would succeed - thus the test
> > fails - than the working copy gets modified. In other words, because of
> one
> > test is failing, other tests might fail too. That's not acceptable for a
> > test suite.
>

Lieven
Received on 2011-02-27 16:12:43 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.