diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-03-11 07:25:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-03-11 07:25:04 +0000 |
commit | 1ebddbe094a78be0a944830f97a771c87bd09d82 (patch) | |
tree | 1ebb57a7f905c9b5689e21f86bb007a6ed4dffe0 /src/integration-tests/gnunet_testing.py.in | |
parent | 5f26e758b71fe887dbacb50ae7e75d86dd4243a2 (diff) | |
download | gnunet-1ebddbe094a78be0a944830f97a771c87bd09d82.tar.gz gnunet-1ebddbe094a78be0a944830f97a771c87bd09d82.zip |
-LRN: Make gnunet_testing.py W32-compatible
Diffstat (limited to 'src/integration-tests/gnunet_testing.py.in')
-rw-r--r-- | src/integration-tests/gnunet_testing.py.in | 6 |
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: | |||
224 | server.spawn (None, [self.test.gnunetstatistics, '-c', self.cfg ,'-q','-n', name, '-s', subsystem ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | 224 | server.spawn (None, [self.test.gnunetstatistics, '-c', self.cfg ,'-q','-n', name, '-s', subsystem ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
225 | #server.expect ("stdout", re.compile (r"")) | 225 | #server.expect ("stdout", re.compile (r"")) |
226 | test = server.read("stdout", 10240) | 226 | test = server.read("stdout", 10240) |
227 | tests = test.partition('\n')[0] | 227 | tests = test.partition('\n') |
228 | # On W32 GNUnet outputs with \r\n, rather than \n | ||
229 | if os.name == 'nt' and tests[1] == '\n' and tests[0][-1] == '\r': | ||
230 | tests = (tests[0][:-1], tests[1], tests[2]) | ||
231 | tests = tests[0] | ||
228 | if (tests.isdigit() == True): | 232 | if (tests.isdigit() == True): |
229 | return tests | 233 | return tests |
230 | else: | 234 | else: |