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

Re: [PATCH] Allow testing of svn client exit codes

From: jeremy hinds <jeremy.hinds_at_gmail.com>
Date: Mon, 25 Feb 2008 19:50:36 -0700

On Mon, Feb 25, 2008 at 6:11 AM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
> jeremy hinds wrote:
> > I am hoping to take a crack at issue 3097 (exit non-zero when running
> > `svn pg` on an unset property) in the near future. And there are a
> > few similar exit-code issues in there. So I thought a good place to
> > start is with the ability to test this sort of thing.
> >
> > I don't know if exit codes are as interesting for the other binaries,
> > so this patch only deals with the client. And since I am still trying
> > to familiarize myself with the conventions, and I'm no Python expert,
> > please let me know what I can do to make this better.
>
> I wonder -- would this be better done by changing the existing
> run_and_verify_svn(), adding an optional expected_exit parameter? We could
> document that when some expected error output is provided, this parameter
> defaults to 1 (or whatever EXIT_FAILURE is), otherwise it defaults to 0
> (EXIT_SUCCESS), but of course callers can pass in the expected value of
> their choosing. Might be a good way to retroactively check all our existing
> test paths against expected exit values.

This does sound like a better approach, but I wasn't sure if it would
work with the existing function signature:

  def run_and_verify_svn(message, expected_stdout, expected_stderr, *varargs):

AFAICT, an optional expected_exit parameter would have to come before
varargs, and would therefore become effectively required, since the
varargs are always present. Am I missing something?

>
> --
> C. Michael Pilato <cmpilato_at_collab.net>
> CollabNet <> www.collab.net <> Distributed Development On Demand
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-02-26 03:50:49 CET

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