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

Re: Oh, the horror of monstrously broken tests...

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-11-19 10:37:03 CET

Branko Čibej wrote:
> I just noticed something fairly horrible. In many places in our test
> suite, we don't check the stderr output from 'svn', which means that
> failed tests aren't always detected. For example, all the autoprop tests
> fail on Windows (because someone used os.path.join to construct a
> URL...pelople never learn), but only three were tagged as failed.
> This is serious. The easiest solution would be for
> svntest.main.run_command to raise an exception if the stderr output
> isn't empty when no error is expected.
> Other suggestions welcome.

I think that is a good solution. run_command doesn't presently document whether unexpected stderr is considered an error, but I think that would be a sensible behaviour. I have just tried it and the following correction is needed to an existing test (it was only a warning, and ignoring it didn't affect the validity of the test):

Index: subversion/tests/clients/cmdline/stat_tests.py
--- subversion/tests/clients/cmdline/stat_tests.py (revision 7787)
+++ subversion/tests/clients/cmdline/stat_tests.py (working copy)
@@ -76,7 +76,6 @@

   # Schedule newdir and newfile for addition
   svntest.main.run_svn(None, 'add', newdir_path)
- svntest.main.run_svn(None, 'add', newfile_path)

   # Created expected output tree for commit
   expected_output = svntest.wc.State(wc_dir, {

That's because the initial "add" is recursive so the second one is redundant.

- Julian

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 19 10:34:58 2003

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.