[PATCH] test/py: tpm2: skip tpm2_startup when env__tpm_device_test_skip=True
Ilias Apalodimas
ilias.apalodimas at linaro.org
Fri Sep 1 09:59:33 CEST 2023
On Fri, 1 Sept 2023 at 10:09, Michal Simek <michal.simek at amd.com> wrote:
>
>
>
> 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.
Uhm? Applied where? I had a few minor fixes I was planning to send to Tom
Thanks
/Ilias
> M
More information about the U-Boot
mailing list