On Wed, Dec 4, 2019 at 3:51 AM Daniel Shahaf <d...@daniel.shahaf.name> wrote: > Nathan Hartman wrote on Wed, 04 Dec 2019 05:43 +00:00: > > 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. > > Confirmed.
Thanks. More below... > > 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. > > Sounds plausible. The comments next to those assignments support > this theory. > > > I'm running the full test suite now... > > > > If all goes well then I think it should be committed. > > We can certainly commit it if your test run passes. I can confirm that with the patch applied, getopt_tests.py runs and all its tests pass when invoked in all three of the following ways: * 'make check' * 'make check TESTS=subversion/tests/cmdline/getopt_tests.py' * 'cd subversion/tests/cmdline' and './getopt_tests.py' I'll go ahead and commit it... We'll see how the buildbots feel about it. :-) More below... > I think it will be even better for *_tests.py to use __file__ rather > than rely on sys.argv[0] to be correct, especially if the sys.argv[0] > fixup happens only after getopt_tests.py's top-level code is run. (We > can commit the patch I posted first and make a change along these lines > afterwards.) That is a bigger change, so I think I'll commit the patch as-is and then go from there... Cheers, Nathan