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

Re: [PATCH] Fix wrapping of 'svn help' output at 80 chars

From: Nathan Hartman <hartman.nathan_at_gmail.com>
Date: Wed, 4 Dec 2019 00:43:49 -0500

On Sun, Dec 1, 2019 at 10:50 PM Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:
> Nathan Hartman wrote on Sun, Dec 01, 2019 at 22:22:26 -0500:
> > On a related note, I cannot seem to run *just* getopt_tests.py. If I
> > run it like this, I get failure:

(snip)

> > $ make check TESTS=subversion/tests/cmdline/getopt_tests.py

(snip)

> > However, if I just run 'make check' and wait patiently,
> > getopt_tests.py passes.

> The attached patch fixes it, but I don't know why. I came up with it by
> comparing the handling of getopt_tests_data to other *_tests_data directories.

You're right. Your patch does fix it. (At least for the use case I
mentioned previously -- 'make check TESTS=...')

Your patch moves the following into load_expected_output():

    # This directory contains all the expected output from svn.
    getopt_output_dir = os.path.join(os.path.dirname(sys.argv[0]),
                                     'getopt_tests_data')

I haven't confirmed this yet but I think that fixes it because at some
point between initialization and this test running, sys.argv[0] is
being modified. I found two instances of sys.argv[0] being assigned in
subversion/tests/cmdline/svntest/main.py -- see _internal_run_tests()
and execute_tests(). Not sure if that's where it's happening.

But I have confirmed that after applying this patch I can successfully
run:

$ make check TESTS=subversion/tests/cmdline/getopt_tests.py

I'm running the full test suite now...

If all goes well then I think it should be committed.

Nathan
Received on 2019-12-04 06:44:07 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.