summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-11 07:25:04 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-11 07:25:04 +0000
commit1ebddbe094a78be0a944830f97a771c87bd09d82 (patch)
tree1ebb57a7f905c9b5689e21f86bb007a6ed4dffe0 /src
parent5f26e758b71fe887dbacb50ae7e75d86dd4243a2 (diff)
-LRN: Make gnunet_testing.py W32-compatible
Diffstat (limited to 'src')
-rw-r--r--src/integration-tests/gnunet_testing.py.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/integration-tests/gnunet_testing.py.in b/src/integration-tests/gnunet_testing.py.in
index 79cbfe9a2..f8b8ff31d 100644
--- a/src/integration-tests/gnunet_testing.py.in
+++ b/src/integration-tests/gnunet_testing.py.in
@@ -224,7 +224,11 @@ class Peer:
server.spawn (None, [self.test.gnunetstatistics, '-c', self.cfg ,'-q','-n', name, '-s', subsystem ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
#server.expect ("stdout", re.compile (r""))
test = server.read("stdout", 10240)
- tests = test.partition('\n')[0]
+ tests = test.partition('\n')
+ # On W32 GNUnet outputs with \r\n, rather than \n
+ if os.name == 'nt' and tests[1] == '\n' and tests[0][-1] == '\r':
+ tests = (tests[0][:-1], tests[1], tests[2])
+ tests = tests[0]
if (tests.isdigit() == True):
return tests
else: