harness: fixed devif test processing bug
authorRoni Häcki <roni.haecki@inf.ethz.ch>
Fri, 4 Aug 2017 14:54:23 +0000 (16:54 +0200)
committerRoni Häcki <roni.haecki@inf.ethz.ch>
Fri, 4 Aug 2017 14:54:23 +0000 (16:54 +0200)
Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

tools/harness/tests/devif_test.py

index be56155..47ee6e4 100644 (file)
@@ -63,12 +63,16 @@ class DevifTests(TestCommon):
 
 
     def process_data(self, testdir, rawiter):
-        passed = False
+
+        if not (self.loop is None):
+            self.loop.kill()
+
         for line in rawiter:
             if "SUCCESS" in line:
-                passed = True
-        self.loop.kill()
-        return PassFailResult(passed)
+                return PassFailResult(True)
+
+        return PassFailResult(False)
+
 
 @tests.add_test
 class DevifNetTxSF(DevifTests):
@@ -123,3 +127,10 @@ class DevifDebug(DevifTests):
 
         return modules
 
+    def process_data(self, testdir, rawiter):
+        for line in rawiter:
+            if "SUCCESS" in line:
+                return PassFailResult(True)
+
+        return PassFailResult(False)
+