From 555451faa541888ef53b06787823f55e8b469a30 Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Wed, 30 Aug 2017 17:21:29 -0700 Subject: [PATCH] all-protocol-starup: Fix triple-output of same vtysh stderr/stdout messages. Signed-off-by: Martin Winter --- .../test_all_protocol_startup.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py index c01b770b40..a0fcf81d8a 100755 --- a/tests/topotests/all-protocol-startup/test_all_protocol_startup.py +++ b/tests/topotests/all-protocol-startup/test_all_protocol_startup.py @@ -178,12 +178,10 @@ def test_error_messages_vtysh(): # Drop everything starting with "FRRouting X.xx" message vtystdout = re.sub(r"FRRouting [0-9]+.*", "", vtystdout, flags=re.DOTALL) - if (vtystdout != ''): - sys.stderr.write('\nr%s created some spurious VTYSH start StdOut messages:\n%s\n' % (i, vtystdout)) - else: + if (vtystdout == ''): print("r%s StdOut ok" % i) - assert vtystdout == '', "Vtysh StdOut Output check failed for router r%s:\n%s" % (i, vtystdout) + assert vtystdout == '', "Vtysh StdOut Output check failed for router r%s" % i # # Second checking Standard Error @@ -197,12 +195,10 @@ def test_error_messages_vtysh(): # # Drop everything starting with "FRRouting X.xx" message # vtystderr = re.sub(r"FRRouting [0-9]+.*", "", vtystderr, flags=re.DOTALL) - if (vtystderr != ''): - sys.stderr.write('\nr%s created some spurious VTYSH start StdErr messages:\n<%s>\n' % (i, vtystderr)) - else: + if (vtystderr == ''): print("r%s StdErr ok" % i) - assert vtystderr == '', "Vtysh StdErr Output check failed for router r%s:\n%s" % (i, vtystderr) + assert vtystderr == '', "Vtysh StdErr Output check failed for router r%s" % i # Make sure that all daemons are running for i in range(1, 2): -- 2.39.5