selftest: subunithelper needs to follow the subunit spec more closely
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 21 Feb 2018 23:46:47 +0000 (12:46 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 22 Feb 2018 00:04:18 +0000 (01:04 +0100)
In particular allow ]\n without \n]\n as used by cmocka

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/subunithelper.py

index 028f5dff77e6d6abb2a9016f2f3a2c6d70d0f7e6..bcd25ffc8b528967ff8d3c1b0f729d0a0697efe0 100644 (file)
@@ -82,7 +82,8 @@ def parse_results(msg_ops, statistics, fh):
                     if l == "":
                         break
                     msg_ops.control_msg(l)
-                    if l == "]\n":
+                    if l[-2:] == "]\n":
+                        reason += l[:-2]
                         terminated = True
                         break
                     else: