subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1740672 - in /subversion/trunk/tools/dist: backport/merger.py backport_tests.py
Date Sat, 23 Apr 2016 20:54:07 GMT
Author: danielsh
Date: Sat Apr 23 20:54:06 2016
New Revision: 1740672

URL: http://svn.apache.org/viewvc?rev=1740672&view=rev
Log:
backport: Developer-facing improvement: Run tests faster.

This is not implemented for backport.pl since backport.pl is deprecated (due
to be replaced in production by backport.py as soon as somebody gets around
to it).

* tools/dist/backport_tests.py:
    Set the 'SVN_BACKPORT_DONT_SLEEP' environment variable.

* tools/dist/backport/merger.py
  (merge): Observe that environment variable, addressing a TODO comment.

Modified:
    subversion/trunk/tools/dist/backport/merger.py
    subversion/trunk/tools/dist/backport_tests.py

Modified: subversion/trunk/tools/dist/backport/merger.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport/merger.py?rev=1740672&r1=1740671&r2=1740672&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport/merger.py (original)
+++ subversion/trunk/tools/dist/backport/merger.py Sat Apr 23 20:54:06 2016
@@ -230,9 +230,9 @@ def merge(entry, expected_stderr=None, *
     revnum = last_changed_revision('./STATUS')
     
     if commit:
-      # TODO: disable this for test runs
       # Sleep to avoid out-of-order commit notifications
-      time.sleep(15)
+      if not os.getenv("SVN_BACKPORT_DONT_SLEEP"): # enabled by the test suite
+          time.sleep(15)
       second_logmsg = "Remove the {!r} branch, {} in r{}."\
                           .format(entry.branch, reintegrated_word, revnum)
       run_svn(['rm', '-m', second_logmsg, '--', branch_url])

Modified: subversion/trunk/tools/dist/backport_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport_tests.py?rev=1740672&r1=1740671&r2=1740672&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport_tests.py (original)
+++ subversion/trunk/tools/dist/backport_tests.py Sat Apr 23 20:54:06 2016
@@ -685,6 +685,8 @@ test_list = [ None,
              ]
 
 if __name__ == '__main__':
+  # Using putenv() here is fine because this file is never run as a module.
+  os.putenv('SVN_BACKPORT_DONT_SLEEP', '1')
   svntest.main.run_tests(test_list)
   # NOTREACHED
 



Mime
View raw message