[PATCH] test/py: tpm2: skip tpm2_startup when env__tpm_device_test_skip=True
Ilias Apalodimas
ilias.apalodimas at linaro.org
Thu Aug 31 10:11:15 CEST 2023
On Wed, 30 Aug 2023 at 19:36, Michal Simek <michal.simek at amd.com> wrote:
>
> All tpm2 tests should be possible to skip when
> env__tpm_device_test_skip=True but test_tpm2_startup is missing it.
>
> Signed-off-by: Michal Simek <michal.simek at amd.com>
> ---
>
> test/py/tests/test_tpm2.py | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py
> index fce689cd992d..c2579fa02c58 100644
> --- a/test/py/tests/test_tpm2.py
> +++ b/test/py/tests/test_tpm2.py
> @@ -71,6 +71,9 @@ def test_tpm2_startup(u_boot_console):
>
> Initiate the TPM internal state machine.
> """
> + skip_test = u_boot_console.config.env.get('env__tpm_device_test_skip', False)
> + if skip_test:
> + pytest.skip('skip TPM device test')
> u_boot_console.run_command('tpm2 startup TPM2_SU_CLEAR')
> output = u_boot_console.run_command('echo $?')
> assert output.endswith('0')
> --
> 2.36.1
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list