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

Re: a testy little patch...

From: Mike Sussman <msussman_at_collab.net>
Date: 2001-06-01 21:57:12 CEST

Ok, hopefully this is in a slightly more rigorous format:

Log:
  * subversion/tests/clients/cmdline/local_test.py

    (update_from_wc_top): Removed new lines characters from expected disk
tree. Changed expected status tree root node to wc_backup.

        Test #7, the "update '.' in working copy" test had been failing of
late. I found two reasons - one was that files in the actual tree were
getting appended (then commited and updated) differently than files in the
expected tree were - specifically, the expected tree files were getting new
line characters. Also, the expected tree was looking for the root node to
be called wc_top, while the actual updated tree was named wc_top_backup.
These changes now cause test #7 to pass on my Linux 7.0 box. However, Ben
Collins-Sussman - on FreeBSD 4.2 - is still having unknown problems running
test #7...We'll investigate it tomorrow.

  * subversion/tests/clients/cmdline/svn_test_main.py

    (client_test): Added ability to list test description with test numbers
by further parsing of argv.

        Apparently we can already run individual tests by specifying "python
local_tests.py n" where n is the actual test number. This is all well and
good, except that as our test suite grows it'll be helpful to know which
test corresponds to which number. Thus, one can now do a "python
local_tests.py list" which will actually list test numbers with their
respective descriptions.

"Karl Fogel" kfogel@collab.net wrote:
> "Mike Sussman" <msussman@collab.net> writes:
> > Playin' around with the python test suite here, and I wanted to submit a
> > couple of changes.
> >
> > First off is a change to svn_test_main.py. Apparently we can already
run
> > individual tests by specifying "python local_tests.py n" where n is the
> > actual test number. This is all well and good, except that as our test
> > suite grows it'll be helpful to know which test corresponds to which
number.
> > Thus, one can now do a "python local_tests.py list" which will actually
list
> > test numbers with their respective descriptions.
> >
> > Secondly, test #7, the "update '.' in working copy" test had been
failing of
> > late. I found two reasons - one was that files in the actual tree were
> > getting appended (then commited and updated) differently than files in
the
> > expected tree were - specifically, the expected tree files were getting
new
> > line characters. Also, the expected tree was looking for the root node
to
> > be called wc_top, while the actual updated tree was named wc_top_backup.
> > These changes now cause test #7 to pass on my Linux 7.0 box. However,
Ben
> > Collins-Sussman - on FreeBSD 4.2 - is still having unknown problems
running
> > test #7...We'll investigate it tomorrow.
>
> Mike,
>
> *Excellent* descriptions of the patch and its motivations. Can you
> provide a log message for the patch, as described in the HACKING file?
> See the section "Writing Log Entries" in HACKING for more on this;
> also, I can show you some sample log entries.
>
> -K
>
>
> > ? local_tests_patch
> > ? svn_main_patch
> > ? patchy
> > Index: local_tests.py
> > ===================================================================
> > RCS file:
> >
/usr/local/tigris/data/helm/cvs/repository/subversion/subversion/tests/clien
> > ts/cmdline/local_tests.py,v
> > retrieving revision 1.7
> > diff -u -r1.7 local_tests.py
> > --- local_tests.py 2001/05/23 19:49:02 1.7
> > +++ local_tests.py 2001/05/31 23:51:28
> > @@ -560,12 +560,12 @@
> >
> > # Create expected disk tree for the update.
> > my_greek_tree = svn_test_main.copy_greek_tree()
> > - my_greek_tree[2][1] = my_greek_tree[2][1] + 'appended mu text\n'
> > - my_greek_tree[14][1] = my_greek_tree[14][1] + 'new appended text for
> > rho\n'
> > + my_greek_tree[2][1] = my_greek_tree[2][1] + 'appended mu text'
> > + my_greek_tree[14][1] = my_greek_tree[14][1] + 'new appended text for
rho'
> > expected_disk_tree = svn_tree.build_generic_tree(my_greek_tree)
> >
> > # Create expected status tree for the update.
> > - status_list = get_virginal_status_list(wc_dir, '2')
> > + status_list = get_virginal_status_list(wc_backup, '2')
> > expected_status_tree = svn_tree.build_generic_tree(status_list)
> >
> > # Do the update and check the results in three ways.
> > Index: svn_test_main.py
> > ===================================================================
> > RCS file:
> >
/usr/local/tigris/data/helm/cvs/repository/subversion/subversion/tests/clien
> > ts/cmdline/svn_test_main.py,v
> > retrieving revision 1.8
> > diff -u -r1.8 svn_test_main.py
> > --- svn_test_main.py 2001/05/17 13:57:42 1.8
> > +++ svn_test_main.py 2001/05/31 23:51:29
> > @@ -198,14 +198,26 @@
> >
> >
> > # Main func
> > +# Three Modes, dependent on sys.argv:
> > +# 1) No arguments: all tests are run
> > +# 2) Number 'n' as arg: only test n is run
> > +# 3) String "list" as arg: test description is displayed with number
> > def client_test(test_list):
> > "Main routine to run all tests in TEST_LIST."
> >
> > testnum = 0
> > - # Parse commandline arg, run one test
> > + # Parse commandline arg, list tests or run one test
> > if (len(sys.argv) > 1):
> > - testnum = int(sys.argv[1])
> > - return run_test(testnum, test_list)
> > + if (sys.argv[1] == 'list'):
> > + print "Test # Test Description"
> > + print "------ ----------------"
> > + n = 1
> > + for x in test_list[1:]:
> > + print " ", n, " ", x.__doc__
> > + n = n+1
> > + else:
> > + testnum = int(sys.argv[1])
> > + return run_test(testnum, test_list)
> >
> > # or run all the tests if no arg.
> > else:
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail: dev-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:31 2006

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