Gitweb links:

...log 
http://git.netsurf-browser.org/buildsystem.git/shortlog/db14e3fc674ca715fbde762c743c31ebf82129cb
...commit 
http://git.netsurf-browser.org/buildsystem.git/commit/db14e3fc674ca715fbde762c743c31ebf82129cb
...tree 
http://git.netsurf-browser.org/buildsystem.git/tree/db14e3fc674ca715fbde762c743c31ebf82129cb

The branch, tlsa/python-testrunner has been updated
       via  db14e3fc674ca715fbde762c743c31ebf82129cb (commit)
      from  ffc010bc1b8c2c38315b05b63e5bb0f8a72e67bc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/buildsystem.git/commit/?id=db14e3fc674ca715fbde762c743c31ebf82129cb
commit db14e3fc674ca715fbde762c743c31ebf82129cb
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    Python test runner: Convert from Python 2 to Python 3.

diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index 2dde372..732a962 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -281,7 +281,7 @@ MKDIRFLAGS ?= -p
 MV ?= mv
 
 PERL ?= perl
-PYTHON ?= python
+PYTHON ?= python3
 
 PKGCONFIG ?= PKG_CONFIG_PATH="$(PREFIX)/lib/pkgconfig:$(PKG_CONFIG_PATH)" 
pkg-config
 
diff --git a/testtools/testrunner.py b/testtools/testrunner.py
index 9d3aee8..6648372 100644
--- a/testtools/testrunner.py
+++ b/testtools/testrunner.py
@@ -1,4 +1,4 @@
-#!/bin/python
+#!/usr/bin/python3
 #
 # Testcase runner for NetSurf projects
 #
@@ -13,7 +13,7 @@
 
 import os
 import sys
-import Queue
+import queue
 import threading
 import subprocess
 
@@ -41,11 +41,11 @@ LOG = open(os.path.join(builddir, "testlog"), "w")
 
 
 def run_test(test_exe, test_data):
-    io_q = Queue.Queue()
+    io_q = queue.Queue()
 
     def output_collector(identifier, stream):
         for line in stream:
-            io_q.put((identifier, line.rstrip()))
+            io_q.put((identifier, line.decode("utf-8").rstrip()))
 
         if not stream.closed:
             stream.close()
@@ -109,7 +109,7 @@ with open(os.path.join(directory, "INDEX"), "r") as TINDEX:
             continue
 
         # Found one; decompose
-        decomposed = filter(None, line.split('\t'))
+        decomposed = list(filter(None, line.split('\t')))
 
         # Strip whitespace
         test = decomposed[0].strip()
@@ -136,7 +136,7 @@ with open(os.path.join(directory, "INDEX"), "r") as TINDEX:
                         continue
 
                     # Found one; decompose
-                    ddecomposed = filter(None, dline.split('\t'))
+                    ddecomposed = list(filter(None, dline.split('\t')))
 
                     # Strip whitespace
                     dtest = ddecomposed[0].strip()


-----------------------------------------------------------------------

Summary of changes:
 makefiles/Makefile.tools |    2 +-
 testtools/testrunner.py  |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index 2dde372..732a962 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -281,7 +281,7 @@ MKDIRFLAGS ?= -p
 MV ?= mv
 
 PERL ?= perl
-PYTHON ?= python
+PYTHON ?= python3
 
 PKGCONFIG ?= PKG_CONFIG_PATH="$(PREFIX)/lib/pkgconfig:$(PKG_CONFIG_PATH)" 
pkg-config
 
diff --git a/testtools/testrunner.py b/testtools/testrunner.py
index 9d3aee8..6648372 100644
--- a/testtools/testrunner.py
+++ b/testtools/testrunner.py
@@ -1,4 +1,4 @@
-#!/bin/python
+#!/usr/bin/python3
 #
 # Testcase runner for NetSurf projects
 #
@@ -13,7 +13,7 @@
 
 import os
 import sys
-import Queue
+import queue
 import threading
 import subprocess
 
@@ -41,11 +41,11 @@ LOG = open(os.path.join(builddir, "testlog"), "w")
 
 
 def run_test(test_exe, test_data):
-    io_q = Queue.Queue()
+    io_q = queue.Queue()
 
     def output_collector(identifier, stream):
         for line in stream:
-            io_q.put((identifier, line.rstrip()))
+            io_q.put((identifier, line.decode("utf-8").rstrip()))
 
         if not stream.closed:
             stream.close()
@@ -109,7 +109,7 @@ with open(os.path.join(directory, "INDEX"), "r") as TINDEX:
             continue
 
         # Found one; decompose
-        decomposed = filter(None, line.split('\t'))
+        decomposed = list(filter(None, line.split('\t')))
 
         # Strip whitespace
         test = decomposed[0].strip()
@@ -136,7 +136,7 @@ with open(os.path.join(directory, "INDEX"), "r") as TINDEX:
                         continue
 
                     # Found one; decompose
-                    ddecomposed = filter(None, dline.split('\t'))
+                    ddecomposed = list(filter(None, dline.split('\t')))
 
                     # Strip whitespace
                     dtest = ddecomposed[0].strip()


-- 
NetSurf Project build system

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to