void-packages/srcpkgs/serf/patches/0003-Make-the-tests-run-with-Python-3.x.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +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
--- a/build/check.py
+++ b/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