[PATCH] test/py: tpm2: skip tpm2_startup when env__tpm_device_test_skip=True
Michal Simek
michal.simek at amd.com
Fri Sep 1 09:09:14 CEST 2023
On 8/30/23 18:36, Michal Simek 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')
Applied.
M
More information about the U-Boot
mailing list