[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/8] tests/acceptance/linux_ssh_mips_malta.py: drop identical
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 3/8] tests/acceptance/linux_ssh_mips_malta.py: drop identical setUp |
Date: |
Fri, 16 Apr 2021 07:26:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 4/15/21 11:51 PM, Cleber Rosa wrote:
> These tests' setUp do not do anything beyong what their base class do.
> And while they do decorate the setUp() we can decorate the classes
> instead, so no functionality is lost here.
This is what I did first when adding this test, but it was not working,
so I had to duplicate it to each method. Did something change so now
this is possible?
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
> tests/acceptance/linux_ssh_mips_malta.py | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/tests/acceptance/linux_ssh_mips_malta.py
> b/tests/acceptance/linux_ssh_mips_malta.py
> index 6dbd02d49d..e309a1105c 100644
> --- a/tests/acceptance/linux_ssh_mips_malta.py
> +++ b/tests/acceptance/linux_ssh_mips_malta.py
> @@ -19,6 +19,8 @@
> from avocado.utils import ssh
>
>
> +@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
> +@skipUnless(ssh.SSH_CLIENT_BINARY, 'No SSH client available')
> class LinuxSSH(Test):
>
> timeout = 150 # Not for 'configure --enable-debug --enable-debug-tcg'
> @@ -65,11 +67,6 @@ def get_kernel_info(self, endianess, wordsize):
> kernel_hash = self.IMAGE_INFO[endianess]['kernel_hash'][wordsize]
> return kernel_url, kernel_hash
>
> - @skipUnless(ssh.SSH_CLIENT_BINARY, 'No SSH client available')
> - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
> - def setUp(self):
> - super(LinuxSSH, self).setUp()
> -
> def get_portfwd(self):
> res = self.vm.command('human-monitor-command',
> command_line='info usernet')
>
[PATCH 4/8] tests/acceptance/migration.py: cancel test if migration is not supported, Cleber Rosa, 2021/04/15