[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/5] tests/acceptance: Print expected message on wait_for_console_
From: |
Cleber Rosa |
Subject: |
[PULL 1/5] tests/acceptance: Print expected message on wait_for_console_pattern |
Date: |
Tue, 16 Mar 2021 23:52:38 -0400 |
From: Wainer dos Santos Moschetta <wainersm@redhat.com>
For the sake of improve debuggability of tests which use the
wait_for_console_pattern(), this changed the _console_interaction() so that
the expected message is printed if the test fail.
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Message-Id: <20210309153507.1905682-1-wainersm@redhat.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
tests/acceptance/avocado_qemu/__init__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/acceptance/avocado_qemu/__init__.py
b/tests/acceptance/avocado_qemu/__init__.py
index df167b142cc..ed338caaba9 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -97,7 +97,8 @@ def _console_interaction(test, success_message,
failure_message,
break
if failure_message and failure_message in msg:
console.close()
- fail = 'Failure message found in console: %s' % failure_message
+ fail = 'Failure message found in console: "%s". Expected: "%s"' % \
+ (failure_message, success_message)
test.fail(fail)
def interrupt_interactive_console_until_pattern(test, success_message,
--
2.30.2
- [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16, Cleber Rosa, 2021/03/16
- [PULL 1/5] tests/acceptance: Print expected message on wait_for_console_pattern,
Cleber Rosa <=
- [PULL 2/5] tests/migration: fix unix socket batch migration, Cleber Rosa, 2021/03/16
- [PULL 3/5] avocado_qemu: add exec_command function, Cleber Rosa, 2021/03/16
- [PULL 4/5] tests: Add functional test for out-of-process device emulation, Cleber Rosa, 2021/03/16
- [PULL 5/5] tests/acceptance: linux-related tests fix, Cleber Rosa, 2021/03/16
- Re: [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16, Peter Maydell, 2021/03/18