]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
patchtest/selftest: only split resultlines once
authorTrevor Gamblin <tgamblin@baylibre.com>
Thu, 21 Sep 2023 13:14:27 +0000 (09:14 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Sep 2023 06:43:51 +0000 (07:43 +0100)
selftest assumes that the test result output lines will consist of two
tokens separated by whitespace, which are the actual result and the name
of the test run. As a result, the script fails if any verbosity is added
to the output of patchtest itself (e.g. by including a failure reason).
Make the call to split() only do so once in order to ensure that two
tokens are obtained.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/patchtest/selftest/selftest

index ba8e1623ee249a20c20de373d00dc33270f8517c..d2b61e951abc2fec1803eb665d6a9dd970839b00 100755 (executable)
@@ -63,7 +63,7 @@ if __name__ == '__main__':
 
             for resultline in results.splitlines():
                 if testid in resultline:
-                    result, _ = resultline.split()
+                    result, _ = resultline.split(' ', 1)
 
                     if expected_result.upper() == "FAIL" and result.upper() == "FAIL":
                         xfailcount = xfailcount + 1