aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass2021-09-19 15:14:48 -0600
committerTom Rini2021-10-05 08:50:15 -0400
commitcfb83f36666154d6eba51c03a5080a91be26f664 (patch)
tree3b70768d7188a0a2350778a6806a5a0c0a1018c8 /test
parent01e1e2a966e282524f01ab14a5ceac793973cf28 (diff)
test: Allow vboot tests to run in parallel
Update the tests to use separate working directories, so we can run them in parallel. It also makes it possible to see the individual output files after the tests have completed. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_vboot.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py
index 6dff6779d17..095e00cce36 100644
--- a/test/py/tests/test_vboot.py
+++ b/test/py/tests/test_vboot.py
@@ -24,6 +24,7 @@ For configuration verification:
Tests run with both SHA1 and SHA256 hashing.
"""
+import os
import shutil
import struct
import pytest
@@ -34,16 +35,16 @@ import vboot_evil
# Only run the full suite on a few combinations, since it doesn't add any more
# test coverage.
TESTDATA = [
- ['sha1', '', None, False, True],
- ['sha1', '', '-E -p 0x10000', False, False],
- ['sha1', '-pss', None, False, False],
- ['sha1', '-pss', '-E -p 0x10000', False, False],
- ['sha256', '', None, False, False],
- ['sha256', '', '-E -p 0x10000', False, False],
- ['sha256', '-pss', None, False, False],
- ['sha256', '-pss', '-E -p 0x10000', False, False],
- ['sha256', '-pss', None, True, False],
- ['sha256', '-pss', '-E -p 0x10000', True, True],
+ ['sha1-basic', 'sha1', '', None, False, True],
+ ['sha1-pad', 'sha1', '', '-E -p 0x10000', False, False],
+ ['sha1-pss', 'sha1', '-pss', None, False, False],
+ ['sha1-pss-pad', 'sha1', '-pss', '-E -p 0x10000', False, False],
+ ['sha256-basic', 'sha256', '', None, False, False],
+ ['sha256-pad', 'sha256', '', '-E -p 0x10000', False, False],
+ ['sha256-pss', 'sha256', '-pss', None, False, False],
+ ['sha256-pss-pad', 'sha256', '-pss', '-E -p 0x10000', False, False],
+ ['sha256-pss-required', 'sha256', '-pss', None, True, False],
+ ['sha256-pss-pad-required', 'sha256', '-pss', '-E -p 0x10000', True, True],
]
@pytest.mark.boardspec('sandbox')
@@ -52,9 +53,9 @@ TESTDATA = [
@pytest.mark.requiredtool('fdtget')
@pytest.mark.requiredtool('fdtput')
@pytest.mark.requiredtool('openssl')
-@pytest.mark.parametrize("sha_algo,padding,sign_options,required,full_test",
+@pytest.mark.parametrize("name,sha_algo,padding,sign_options,required,full_test",
TESTDATA)
-def test_vboot(u_boot_console, sha_algo, padding, sign_options, required,
+def test_vboot(u_boot_console, name, sha_algo, padding, sign_options, required,
full_test):
"""Test verified boot signing with mkimage and verification with 'bootm'.
@@ -365,7 +366,9 @@ def test_vboot(u_boot_console, sha_algo, padding, sign_options, required,
run_bootm(sha_algo, 'multi required key', '', False)
cons = u_boot_console
- tmpdir = cons.config.result_dir + '/'
+ tmpdir = os.path.join(cons.config.result_dir, name) + '/'
+ if not os.path.exists(tmpdir):
+ os.mkdir(tmpdir)
datadir = cons.config.source_dir + '/test/py/tests/vboot/'
fit = '%stest.fit' % tmpdir
mkimage = cons.config.build_dir + '/tools/mkimage'