subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1743556 - /subversion/trunk/build/run_tests.py
Date Thu, 12 May 2016 20:05:38 GMT
Author: stefan2
Date: Thu May 12 20:05:38 2016
New Revision: 1743556

URL: http://svn.apache.org/viewvc?rev=1743556&view=rev
Log:
Get the Python 3 tests running without the GLOBAL_SCHEDULER option.

* build/run_tests.py
  (TestHarness._run_c_test.progress_func,
   TestHarness._run_py_test.progress_func,
   TestHarness._run_test):  The log is binary data, so write byte strings
                            to it.

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=1743556&r1=1743555&r2=1743556&view=diff
==============================================================================
--- subversion/trunk/build/run_tests.py (original)
+++ subversion/trunk/build/run_tests.py Thu May 12 20:05:38 2016
@@ -781,7 +781,7 @@ class TestHarness:
     def progress_func(completed):
       if not self.log or self.dots_written >= dot_count:
         return
-      dots = (completed * dot_count) / total
+      dots = (int)((completed * dot_count) / total)
       if dots > dot_count:
         dots = dot_count
       dots_to_write = dots - self.dots_written
@@ -834,7 +834,7 @@ class TestHarness:
          in parallel mode."""
       if not self.log:
         return
-      dots = (completed * dot_count) / total
+      dots = int((completed * dot_count) / total)
       if dots > dot_count:
         dots = dot_count
       self.progress_lock.acquire()
@@ -897,9 +897,9 @@ class TestHarness:
       test_info = ''
 
     if self.opts.list_tests:
-      log.write('LISTING: %s\n' % progbase)
+      log.write(('LISTING: %s\n' % progbase).encode())
     else:
-      log.write('START: %s\n' % progbase)
+      log.write(('START: %s\n' % progbase).encode())
 
     log.flush()
 
@@ -929,10 +929,10 @@ class TestHarness:
     if not self.opts.list_tests:
       # Log the elapsed time.
       elapsed_time = str(datetime.now() - start_time)
-      log.write('END: %s\n' % progbase)
-      log.write('ELAPSED: %s %s\n' % (progbase, elapsed_time))
+      log.write(('END: %s\n' % progbase).encode())
+      log.write(('ELAPSED: %s %s\n' % (progbase, elapsed_time)).encode())
 
-    log.write('\n')
+    log.write(b'\n')
 
     # If we are only listing the tests just add a newline, otherwise if
     # we printed a "Running all tests in ..." line, add the test result.



Mime
View raw message