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

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

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sun, 8 May 2016 17:46:43 +0200

> -----Original Message-----
> From: stefan2_at_apache.org [mailto:stefan2_at_apache.org]
> Sent: zondag 8 mei 2016 15:43
> To: commits_at_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
Received on 2016-05-08 17:47:04 CEST

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.