void-packages/srcpkgs/serf/patches/0003-Make-the-tests-run-with-Python-3.x.patch
2020-10-25 11:47:50 +07:00

43 lines
1.5 KiB
Diff

From a00f7abd15a92ae77806edca6227ed09aae2b711 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Branko=20=C4=8Cibej?= <brane@apache.org>
Date: Sat, 9 Jun 2018 08:10:10 +0000
Subject: [PATCH 3/3] Make the tests run with Python 3.x.
* build/check.py: Add parentheses around 'print' statement arguments
so that they work when 'print' is a function.
git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1833223 13f79535-47bb-0310-9956-ffa450edef68
---
build/check.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git build/check.py build/check.py
index 2dacb4c..341bb3b 100755
--- build/check.py
+++ build/check.py
@@ -52,16 +52,16 @@ if __name__ == '__main__':
# Find test responses and run them one by one
for case in glob.glob(testdir + "/testcases/*.response"):
- print "== Testing %s ==" % (case)
+ print("== Testing %s ==" % (case))
try:
subprocess.check_call([SERF_RESPONSE_EXE, case])
- except subprocess.CalledProcessError:
- print "ERROR: test case %s failed" % (case)
+ except subprocess.CalledProcessError as x:
+ print("ERROR: test failed in '%s', exit code=%d" % (x.cmd, x.returncode))
sys.exit(1)
- print "== Running the unit tests =="
+ print("== Running the unit tests ==")
try:
subprocess.check_call(TEST_ALL_EXE)
- except subprocess.CalledProcessError:
- print "ERROR: test(s) failed in test_all"
+ except subprocess.CalledProcessError as x:
+ print("ERROR: test(s) failed in '%s', exit code=%d" % (x.cmd, x.returncode))
sys.exit(1)
--
2.29.0.rc1