diff options
author | Robert Collins <robertc@robertcollins.net> | 2013-03-16 03:30:24 +1300 |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2013-03-16 03:30:24 +1300 |
commit | e117a1f563356a6c66369e3abf2fb970f2ccb5ff (patch) | |
tree | 2f0354fd66f284b86be0299475e21883368bcef3 | |
parent | 39fbaee8cd5b66909dcae94dde7fc743de372fef (diff) | |
download | testrepository-e117a1f563356a6c66369e3abf2fb970f2ccb5ff.tar.gz |
More reasoning for \n in return-code injection.
-rw-r--r-- | testrepository/commands/run.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/testrepository/commands/run.py b/testrepository/commands/run.py index 16d861d..524716a 100644 --- a/testrepository/commands/run.py +++ b/testrepository/commands/run.py @@ -68,7 +68,10 @@ class ReturnCodeToSubunit(object): returncode = self.proc.wait() if returncode != 0: if self.lastoutput != LINEFEED: - # Subunit is line orientated, it has to start on a fresh line. + # Subunit V1 is line orientated, it has to start on a fresh + # line. V2 needs to start on any fresh utf8 character border + # - which is not guaranteed in an arbitrary stream endpoint, so + # injecting a \n gives us such a guarantee. self.source.write(_b('\n')) if v2_avail: stream = subunit.StreamResultToBytes(self.source) |