summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-08-06 17:51:49 -0600
committerTom Rini <trini@konsulko.com>2022-09-12 18:06:36 -0400
commitc620ea45a799b2d18fd567105d60860e86434023 (patch)
treee2139bd842890dcaf21e429d419baee30e60cad7 /test
parent78ac0deafd8d39c17d5ffa1cd64cd5f4ccb7193c (diff)
downloadu-boot-c620ea45a799b2d18fd567105d60860e86434023.tar.gz
u-boot-c620ea45a799b2d18fd567105d60860e86434023.tar.bz2
u-boot-c620ea45a799b2d18fd567105d60860e86434023.zip
test: Update FIT tests to run in parallel
Use a different temporary dir for each test, to allow them to run in parallel. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_fit_ecdsa.py4
-rw-r--r--test/py/tests/test_fit_hashes.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/test/py/tests/test_fit_ecdsa.py b/test/py/tests/test_fit_ecdsa.py
index 87b6081222..cc6c0c4dc4 100644
--- a/test/py/tests/test_fit_ecdsa.py
+++ b/test/py/tests/test_fit_ecdsa.py
@@ -10,6 +10,7 @@ signature is then extracted, and verified against pyCryptodome.
This test doesn't run the sandbox. It only checks the host tool 'mkimage'
"""
+import os
import pytest
import u_boot_utils as util
from Cryptodome.Hash import SHA256
@@ -84,7 +85,8 @@ def test_fit_ecdsa(u_boot_console):
cons = u_boot_console
mkimage = cons.config.build_dir + '/tools/mkimage'
datadir = cons.config.source_dir + '/test/py/tests/vboot/'
- tempdir = cons.config.result_dir
+ tempdir = os.path.join(cons.config.result_dir, 'ecdsa')
+ os.makedirs(tempdir, exist_ok=True)
key_file = f'{tempdir}/ecdsa-test-key.pem'
fit_file = f'{tempdir}/test.fit'
dtc('sandbox-kernel.dts')
diff --git a/test/py/tests/test_fit_hashes.py b/test/py/tests/test_fit_hashes.py
index e228ea96d3..4891e77ca2 100644
--- a/test/py/tests/test_fit_hashes.py
+++ b/test/py/tests/test_fit_hashes.py
@@ -10,6 +10,7 @@ output of a fixed data block with known good hashes.
This test doesn't run the sandbox. It only checks the host tool 'mkimage'
"""
+import os
import pytest
import u_boot_utils as util
@@ -93,7 +94,9 @@ def test_mkimage_hashes(u_boot_console):
cons = u_boot_console
mkimage = cons.config.build_dir + '/tools/mkimage'
datadir = cons.config.source_dir + '/test/py/tests/vboot/'
- tempdir = cons.config.result_dir
+ tempdir = os.path.join(cons.config.result_dir, 'hashes')
+ os.makedirs(tempdir, exist_ok=True)
+
fit_file = f'{tempdir}/test.fit'
dtc('sandbox-kernel.dts')