sbsv2/raptor/test/common/raptor_tests.py
branchfix
changeset 494 79e0aa507647
parent 493 4a86d5ea40ef
--- a/sbsv2/raptor/test/common/raptor_tests.py	Tue Apr 27 16:45:26 2010 +0100
+++ b/sbsv2/raptor/test/common/raptor_tests.py	Wed Apr 28 14:18:35 2010 +0100
@@ -604,13 +604,14 @@
 		# .whatlog output is used verbatim from the build/TEM/EM output
 		self.hostossensitive = True
 		
-		# Indicate whether ouput is expected to appear only once. If so, set it to True
+		# Indicate whether output is expected to appear only once. If so, set it to True
 		self.output_expected_only_once = False 
 	
 	def posttest(self):
 		outlines = self.output.splitlines()
-		outlines_left = outlines 
-
+		if self.output_expected_only_once:
+			outlines_left = list(outlines) 
+		
 		ok = True
 		seen = []
 		
@@ -624,7 +625,8 @@
 				
 			if line in outlines:
 				seen.append(line)
-				outlines_left.remove(line) 
+				if self.output_expected_only_once:
+					outlines_left.remove(line) 
 			else:
 				print "OUTPUT NOT FOUND:", line
 				ok = False
@@ -636,7 +638,6 @@
 			if not line in seen:
 				print "UNEXPECTED OUTPUT:", line
 				ok = False
-				outlines_left.remove(line) 
 		
 		# and check for lines that we expected to see only once
 		if self.output_expected_only_once: