From: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx> Make status functions such as skip(), pass() and fail() return their own method function as a means to identifing which status value is determined for a given test operation. This allows test results to be determined in methods, and for the parent method or class to respond accordingly Signed-off-by: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx> --- tests/kmstest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/kmstest.py b/tests/kmstest.py index cb0d9a7546d8..5938dc4a4da2 100755 --- a/tests/kmstest.py +++ b/tests/kmstest.py @@ -310,6 +310,7 @@ class KMSTest(object): self.logger.flush() sys.stdout.write("\rTesting %s: FAIL\n" % self.test_name) sys.stdout.flush() + return self.fail def skip(self, reason): """Complete a test with skip.""" @@ -317,6 +318,7 @@ class KMSTest(object): self.logger.flush() sys.stdout.write("SKIP\n") sys.stdout.flush() + return self.skip def success(self): """Complete a test with success.""" @@ -324,4 +326,5 @@ class KMSTest(object): self.logger.flush() sys.stdout.write("\rTesting %s: SUCCESS\n" % self.test_name) sys.stdout.flush() + return self.success -- 2.7.4