fixed stdout+stderr mixing in tests fix
authorRichard Taylor <richard.i.taylor@nokia.com>
Mon, 29 Mar 2010 11:35:45 +0100
branchfix
changeset 415 6fdebb56755a
parent 414 fdf44dc5eff3
child 416 fe1f29c50d40
fixed stdout+stderr mixing in tests
sbsv2/raptor/test/common/raptor_tests.py
sbsv2/raptor/test/smoke_suite/timeout.py
--- a/sbsv2/raptor/test/common/raptor_tests.py	Fri Mar 26 15:47:26 2010 +0000
+++ b/sbsv2/raptor/test/common/raptor_tests.py	Mon Mar 29 11:35:45 2010 +0100
@@ -417,22 +417,26 @@
 
 			p = subprocess.Popen(args=[BASH, '-c', command], 
 					stdout=subprocess.PIPE,
-					stderr=subprocess.STDOUT,
+					stderr=subprocess.PIPE,
 					env=shellenv,
 					shell=False,
 					universal_newlines=True)
 
-			self.output = p.communicate()[0]
+			(std_out, std_err) = p.communicate()
+			
+			self.output = std_out + std_err
 		else:
 			p = subprocess.Popen(command, 
 					stdout=subprocess.PIPE,
-					stderr=subprocess.STDOUT,
+					stderr=subprocess.PIPE,
 					env=shellenv,
 					shell=True,
 					universal_newlines=True)
 
-			self.output = p.communicate()[0]
-
+			(std_out, std_err) = p.communicate()
+			
+			self.output = std_out + std_err
+			
 		if debug_mode_active:
 			print self.output
 
--- a/sbsv2/raptor/test/smoke_suite/timeout.py	Fri Mar 26 15:47:26 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/timeout.py	Mon Mar 29 11:35:45 2010 +0100
@@ -26,9 +26,9 @@
 	t.id = "60a"
 	t.name = "timeout"
 	t.usebash = True
-	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f-"
+	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f -"
 
-	t.mustmatch = [
+	t.mustmatch_singleline = [
 		"status exit='failed' code='" + exitCode + "' attempt='1' reason='timeout'",
 	]
 	t.errors = -1
@@ -38,7 +38,7 @@
 	t.id = "60b"
 	t.name = "timeout with retries"
 	t.usebash = True
-	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f-"
+	t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f -"
 
 	t.mustmatch_singleline = [
 		"status exit='retry' code='" + exitCode + "' attempt='1' reason='timeout'",