# HG changeset patch # User Richard Taylor # Date 1269858945 -3600 # Node ID 6fdebb56755a8bd026ef6ba83f5d0c8554171d2d # Parent fdf44dc5eff332a2ecd9019f265888faab5a0d20 fixed stdout+stderr mixing in tests diff -r fdf44dc5eff3 -r 6fdebb56755a sbsv2/raptor/test/common/raptor_tests.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 diff -r fdf44dc5eff3 -r 6fdebb56755a sbsv2/raptor/test/smoke_suite/timeout.py --- 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'",