diff options
author | Michal Simek <michal.simek@amd.com> | 2023-08-30 18:36:23 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@amd.com> | 2023-09-21 13:20:11 +0200 |
commit | 280fcda109eede9c987b1512a532973e61f06455 (patch) | |
tree | 56bd08bd0616e7614d652ecfc0c8909d702a84c1 | |
parent | 55e281049c49ac779b1c533abde5c3c2ffa0cc8e (diff) | |
download | u-boot-280fcda109eede9c987b1512a532973e61f06455.zip u-boot-280fcda109eede9c987b1512a532973e61f06455.tar.gz u-boot-280fcda109eede9c987b1512a532973e61f06455.tar.bz2 |
test/py: tpm2: skip tpm2_startup when env__tpm_device_test_skip=True
All tpm2 tests should be possible to skip when
env__tpm_device_test_skip=True but test_tpm2_startup is missing it.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/41f932e52bdd206b1b68d5ff313fc29b794a70e7.1693413381.git.michal.simek@amd.com
-rw-r--r-- | test/py/tests/test_tpm2.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py index fce689c..c2579fa 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') |