[PATCH 1/2] tests/kmstest: Status functions return themselves.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux