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

Re: [PATCH] Add diagnostic output to svnversion_tests.py

From: Erik Hülsmann <e.huelsmann_at_gmx.net>
Date: 2003-08-05 17:50:52 CEST
('binary' encoding is not supported, stored as-is) Hi Michael,

Thanks for your comments, but:

[snip]
>> I changed the svnversion_tests.py file to generate diagnostic output
>> like the run_and_verify_* series of commands does for svn.
>[snip]
>> +def run_and_verify_svnversion(wc_dir, repo_url, expected_output):
>> + "run the svnversion command and check it's output"
>> + output, errput = svntest.main.run_svnversion(wc_dir, repo_url)
>> + if (expected_output and (errput or output != expected_output)):
[snip]
>> + return 1
>Why not "raise svntest.Failure" here?

Actually, my first design was like that, but then I looked at the tests
which use the run_and_verify_* api for testing subversion calls and
I discovered that the error is thrown by the calling test, not by
within the api.

 

>> + elif ((not expected_output) and (not errput or output)):
>> + print "COMMAND:\nsvnversion ", wc_dir, " ", repo_url
>> + print "EXPECTED: (stdout)\n(none)"
>> + print "ACTUAL:\nstdout:\n", output
>> + print "stderr:\n", errput
>> + return 1
>And here?

Same reason.

[snip]
>And then just change this to:
>- output, errput = svntest.main.run_svnversion(wc_dir, repo_url)
>- if errput or output != [ "1\n" ]:
>- raise svntest.Failure
>+ run_and_verify_svnversion(wc_dir, repo_url, [ "1\n" ])
>
>Same for the others.
>
>Please ignore my comments if you don't feel they're valid :)

Oh, no. Your questions are valid. The point should be whether you
all feel that my answers are... :-)

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 5 17:51:43 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.