On Tue, Oct 15, 2019 at 6:20 PM Yasuhito FUTATSUKI <futat...@poem.co.jp> wrote: > > On 2019-10-15 17:17, Johan Corveleyn wrote: > > On Tue, Oct 15, 2019 at 9:26 AM Yasuhito FUTATSUKI <futat...@poem.co.jp> > > wrote: > >> > >> On 2019-10-15 07:04, Daniel Shahaf wrote: > >>> Yasuhito FUTATSUKI wrote on Sun, 13 Oct 2019 04:01 +00:00: > >>>> On 2019/10/13 7:24, Daniel Shahaf wrote: > >> > >>>> I see. Now I agree it would suffice here. > >>>> > >>>>> So, how about: > >>>>> > >>>>> 1. Make the test use non-binary mode for changing and reading the > >>>>> file 'lambda'. > > >>>>> 2. Locally revert the C part of r1841731 and make sure the modified test > >>>>> still (correctly) fails. (That revision both added the test and > >>>>> fixed the bug the test checks for.) > > I overlooked comments in this test. On step 2 the test will continue to loop > as far as resource is available, or until signaled. > > And yes, after 'svn merge -r1841731:1841730 > subversion/libsvn_client/conflicts.c', > the test can't reach patched line. So no more test is needed on step 2, both > on Unix/Linux and on Windows. > > >>>> > >>>> So it looks sufficient to me. > >>> > >>> Cool. Will you perchance have time to do this? No worries if not. > >> > >> Yes, I'll do it on FreeBSD on tonight or tomorrow night (in JST :)). > > with the attached patch, both with Python 2.7.15 and Python 3.7.0 on FreeBSD, > tree_conflict_tests passed. > > >> However I think it is also need to test for each 1 and 2 on Windows, > >> because r1841736 and r1841743 also were attempt to fix this test > >> on Windows, with Python 2. > > > > Feel free to let me know if I need to test something on Windows. > > Thank you. Could you please test the tree_conflict_tests with this patch, > both with Python 2 and Python 3 on Windows?
Okay, I can confirm that tree_conflict_tests works with Python 2.7.16 (both with and without the patch) and with 3.7.5 (with the patch) on Windows 7. I did have some trouble testing it with Python 3.7 though: - First, I had to try it on the swig-py3 branch, because on trunk I get this when trying to run any test with py 3.7: [[[ Traceback (most recent call last): File "win-tests.py", line 134, in <module> cp.items('options')) File "build\generator\gen_win_dependencies.py", line 306, in __init__ self.find_libraries(False) File "build\generator\gen_win_dependencies.py", line 327, in find_libraries self._find_jdk(show_warnings) File "build\generator\gen_win_dependencies.py", line 1085, in _find_jdk vermatch = re.search(r'(([0-9]+(\.[0-9]+)+)(_[._0-9]+)?)', line, re.M) File "C:\Python37\lib\re.py", line 183, in search return _compile(pattern, flags).search(string) TypeError: cannot use a string pattern on a bytes-like object ]]] I guess that's one of the issues fixed by the swig-py3 branch. - Then, on the swig-py3 branch, with py 3.7.4 I ran into this issue: https://bugs.python.org/issue37549 (os.dup() fails for standard streams on Windows 7) This fails for any *.py test, because of line 836 in build/run_tests.py: old_stdout = os.dup(sys.stdout.fileno()) It errors out with: OSError: [WinError 87] The parameter is incorrect - Upgraded to py 3.7.5, in which the above issue seems to be fixed. Now, *.py tests still don't work. I get no output at all: [[[ C:\research\svn\dev\swig-py3>python win-tests.py --release -t tree_conflict . 'ruby' is not recognized as an internal or external command, operable program or batch file. Testing Release configuration on local repository. [1/1] tree_conflict_tests.py C:\research\svn\dev\swig-py3> ]]] tests.log only contains one line: START: tree_conflict_tests.py However, if I run it with --log-to-stdout, the tests do work (with a lot of output on stdout). I.e. I get some fails without your fix_tree_conflict_tests_patch.txt, and all tests successful if I apply the patch. Conclusion: I can confirm your patch works on Windows, for both Pyton 2.7.16 and 3.7.5 on the swig-py3 branch. As for the stdout redirection, I guess there might still be a problem ... perhaps the fix for https://bugs.python.org/issue37549 is not sufficient for Windows 7 ... dunno. Maybe someone can try this on Windows 10 and see if it makes a difference. -- Johan