[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: Paul Burba <ptburba_at_gmail.com>
Date: Tue, 4 Mar 2008 12:56:37 -0500

On Tue, Mar 4, 2008 at 8:56 AM, Julian Foad <julianfoad_at_btopenworld.com> wrote:
> Is anyone able to review Jeremy's patch for the test suite, or test it
> (especially on Windows)?

I'll try it out on Windows. But first, Jeremy, could you please
resend your patch as an attachment? When the patch is embedded within
the text of the e-mail, the lines get wrapped at 80 characters. I
tried to fix these manually, but I'm still getting strange errors when
applying the patch. Admittedly I'm using a nightly build of
TortoiseSVN to do this, so the problem might be there, but it would be
nice to eliminate the possibility I've mangled the patch. In general
it's best to send patches as attachments - see
http://subversion.tigris.org/hacking.html#patches.

Thanks!

Paul

> Some brief comments on the log message:
> (1) There's no indication that any of this is platform-specific; is it?
> (Does it work properly on Windows, as a possible problem was mentioned earlier?)
> (2) I'd add your second paragraph below ("This has all...") into the log
> message.
> (3) Where you write "Capture exit_code ..." that kind of implies saving it,
> but in fact it gets ignored; perhaps you could use words like "Accept and
> ignore the exit code" instead.
>
> These things are just niceties for when the patch gets accepted and committed.
>
> - Julian
>
>
>
>
> jeremy hinds wrote:
> > Here is the revised patch for review. Corresponding changes to the
> > test scripts aren't included yet (though a few are in the attachment,
> > so that these changes can actually be executed).
> >
> > This has all of the lower-level process-running functions returning
> > the exit code, all of the "run_and_verify_*()" functions guessing the
> > expected exit code, and new "run_and_verify_*2()" functions allowing
> > the expected exit code to be provided explicitly.
> >
> > [[[
> > Allow testing of application exit codes.
> >
> > * subversion/tests/cmdline/svntest/main.py
> > (run_command, run_svn, run_svnadmin, run_svnlook, run_svnsync,
> > run_svnversion): Include exit_code in the returned tuple.
> >
> > (create_repos): Capture exit_code returned from run_command.
> >
> > * subversion/tests/cmdline/svntest/actions.py
> > (run_and_verify_svnlook2, run_and_verify_svnadmin2,
> > run_and_verify_svnversion2, run_and_verify_svn2,
> > run_and_verify_svn_match_any2): New, execute the indicated binary
> > and check actual outputs and exit code against the expected value
> > parameters.
> >
> > (run_and_verify_svnlook, run_and_verify_svnadmin,
> > run_and_verify_svnversion, run_and_verify_svn,
> > run_and_verify_svn_match_any): Guess whether the expected exit should
> > be 0 or 1 based on whether output is expected on stderr. Then invoke
> > the coresponding run_and_verify_*2 function with that value. Return
> > exit_code, stdout_lines, stderr_lines.
> >
> > (setup_pristine_repository, run_and_verify_load, run_and_verify_dump,
> > run_and_verify_checkout, run_and_verify_update, run_and_verify_commit,
> > run_and_verify_status, run_and_verify_unquiet_status,
> > run_and_verify_diff_summarize, check_prop, inject_conflict_into_wc):
> > Capture exit_code value returned from main.run_svn, main.run_command,
> > main.run_svnadmin, main.run_command_stdin
> >
> > * subversion/tests/cmdline/svntest/tree.py
> > (get_props): Capture exit code returned by main.run_svn.
> >
> > * subversion/tests/cmdline/svntest/verify.py
> > (SVNUnexpectedExitCode): New exception raised when the exit code was not
> > what was expected.
> >
> > (verify_exit_code): New, compares expected and actual exit code and raises
> > an exception if they are different.
> > ]]]
> [...]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-03-04 18:56:49 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.