summaryrefslogtreecommitdiff
blob: fbbfe36fefe076fbf15aaa1eb94122339d987be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
From 05eae144c6b3ed85f0829de6278a8f89505506f0 Mon Sep 17 00:00:00 2001
From: Bert Huijben <rhuijben@apache.org>
Date: Mon, 2 Nov 2015 17:50:29 +0000
Subject: [PATCH] * build/check.py   Print a bit more information about the
 failed test. The returncode might   be interesting to track down signal
 problems.

git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1712098 13f79535-47bb-0310-9956-ffa450edef68
---
 build/check.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/build/check.py b/build/check.py
index fc49d336..75287016 100755
--- a/build/check.py
+++ b/build/check.py
@@ -55,13 +55,13 @@
     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, x:
+      print "ERROR: test failed in '%s', exit code=%d" % (x.cmd, x.returncode)
       sys.exit(1)
 
   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, x:
+    print "ERROR: test(s) failed in '%s', exit code=%d" % (x.cmd, x.returncode)
     sys.exit(1)
From 773a2ee2ca7a48dd8356707fa6774afcf5b85470 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] 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 a/build/check.py b/build/check.py
index 75287016..e05760f9 100755
--- a/build/check.py
+++ b/build/check.py
@@ -52,16 +52,16 @@
 
   # 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, x:
-      print "ERROR: test failed in '%s', exit code=%d" % (x.cmd, x.returncode)
+    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, x:
-    print "ERROR: test(s) failed in '%s', exit code=%d" % (x.cmd, x.returncode)
+  except subprocess.CalledProcessError as x:
+    print("ERROR: test(s) failed in '%s', exit code=%d" % (x.cmd, x.returncode))
     sys.exit(1)