You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <be...@qqmail.nl> on 2016/05/08 15:46:43 UTC

RE: svn commit: r1742820 - /subversion/trunk/build/run_tests.py


> -----Original Message-----
> From: stefan2@apache.org [mailto:stefan2@apache.org]
> Sent: zondag 8 mei 2016 15:43
> To: commits@subversion.apache.org
> Subject: svn commit: r1742820 - /subversion/trunk/build/run_tests.py
> 
> Author: stefan2
> Date: Sun May  8 13:42:47 2016
> New Revision: 1742820
> 
> URL: http://svn.apache.org/viewvc?rev=1742820&view=rev
> Log:
> In our build and test scripts, don't import built-in modules when in Python 3.
> 
> * build/run_tests.py
>   (): The exceptions module only needs to be imported pre-Python 3.
> 
> Modified:
>     subversion/trunk/build/run_tests.py
> 
> Modified: subversion/trunk/build/run_tests.py
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=17
> 42820&r1=1742819&r2=1742820&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/build/run_tests.py (original)
> +++ subversion/trunk/build/run_tests.py Sun May  8 13:42:47 2016
> @@ -48,7 +48,7 @@ separated list of test numbers; the defa
>  import os, sys, shutil
>  import re
>  import logging
> -import optparse, subprocess, imp, threading, traceback, exceptions
> +import optparse, subprocess, imp, threading, traceback
>  from datetime import datetime
> 
>  try:
> @@ -58,6 +58,10 @@ except ImportError:
>    # Python <3.0
>    import Queue as queue
> 
> +if sys.version_info < (3, 0):
> +  # Python >= 3.0 already has this build in
> +  import exceptions


FYI: https://ci.apache.org/builders/svn-windows-ra/builds/1024/steps/Test%20fsfs%2Bserf/logs/faillog shows quite a few errors like:

[[[
W: CWD: E:\svn-ra\tests\subversion\tests\cmdline
Traceback (most recent call last):
  File "D:\ra\svn-ra\build\subversion\tests\cmdline\svntest\main.py", line 1788, in run
    rc = self.pred.run(sandbox)
  File "D:\ra\svn-ra\build\subversion\tests\cmdline\svntest\testcase.py", line 258, in run
    return self._delegate.run(sandbox)
  File "D:\ra\svn-ra\build\subversion\tests\cmdline\svntest\testcase.py", line 178, in run
    result = self.func(sandbox)
  File "D:\ra\svn-ra\build\subversion\tests\cmdline\lock_tests.py", line 2219, in dav_lock_refresh
    if sys.version_info < (3, 0):
NameError: global name 'sys' is not defined
FAIL:  lock_tests.py 57: refresh timeout of DAV lock
]]]

Most (if not all) can't find sys.

After this patch (combined with the previous +- 3 patches).

It appears to be specific for the ra-dav test runs...

I'm not sure which exact patch introduced this error though.

	Bert


Re: svn commit: r1742820 - /subversion/trunk/build/run_tests.py

Posted by Stefan Fuhrmann <st...@apache.org>.
On 08.05.2016 17:46, Bert Huijben wrote:
>
>> -----Original Message-----
>> From: stefan2@apache.org [mailto:stefan2@apache.org]
>> Sent: zondag 8 mei 2016 15:43
>> To: commits@subversion.apache.org
>> Subject: svn commit: r1742820 - /subversion/trunk/build/run_tests.py
>>
>> Author: stefan2
>> Date: Sun May  8 13:42:47 2016
>> New Revision: 1742820
>>
>> URL: http://svn.apache.org/viewvc?rev=1742820&view=rev
>> Log:
>> In our build and test scripts, don't import built-in modules when in Python 3.
>>
>> * build/run_tests.py
>>    (): The exceptions module only needs to be imported pre-Python 3.
>>
>> Modified:
>>      subversion/trunk/build/run_tests.py
>>
>> Modified: subversion/trunk/build/run_tests.py
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=17
>> 42820&r1=1742819&r2=1742820&view=diff
>> ==========================================================
>> ====================
>> --- subversion/trunk/build/run_tests.py (original)
>> +++ subversion/trunk/build/run_tests.py Sun May  8 13:42:47 2016
>> @@ -48,7 +48,7 @@ separated list of test numbers; the defa
>>   import os, sys, shutil
>>   import re
>>   import logging
>> -import optparse, subprocess, imp, threading, traceback, exceptions
>> +import optparse, subprocess, imp, threading, traceback
>>   from datetime import datetime
>>
>>   try:
>> @@ -58,6 +58,10 @@ except ImportError:
>>     # Python <3.0
>>     import Queue as queue
>>
>> +if sys.version_info < (3, 0):
>> +  # Python >= 3.0 already has this build in
>> +  import exceptions
>
> FYI: https://ci.apache.org/builders/svn-windows-ra/builds/1024/steps/Test%20fsfs%2Bserf/logs/faillog shows quite a few errors like:
>
> [[[
> W: CWD: E:\svn-ra\tests\subversion\tests\cmdline
> Traceback (most recent call last):
>    File "D:\ra\svn-ra\build\subversion\tests\cmdline\svntest\main.py", line 1788, in run
>      rc = self.pred.run(sandbox)
>    File "D:\ra\svn-ra\build\subversion\tests\cmdline\svntest\testcase.py", line 258, in run
>      return self._delegate.run(sandbox)
>    File "D:\ra\svn-ra\build\subversion\tests\cmdline\svntest\testcase.py", line 178, in run
>      result = self.func(sandbox)
>    File "D:\ra\svn-ra\build\subversion\tests\cmdline\lock_tests.py", line 2219, in dav_lock_refresh
>      if sys.version_info < (3, 0):
> NameError: global name 'sys' is not defined
> FAIL:  lock_tests.py 57: refresh timeout of DAV lock
> ]]]
>
> Most (if not all) can't find sys.
>
> After this patch (combined with the previous +- 3 patches).
>
> It appears to be specific for the ra-dav test runs...
>
> I'm not sure which exact patch introduced this error though.
Already fixed with r1742830 and r1742839.

I expect that some of my upcoming patches may break
the tests on Windows and / or for ra-dav. Therefore, I
keep an eye on the windows-ra build bot ...

-- Stefan^2.