diff options
author | Simon Glass <sjg@chromium.org> | 2025-02-09 09:07:16 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-03-15 11:02:04 +0000 |
commit | dd693ecb60384049dd8c3f6a36331c1a70b6558f (patch) | |
tree | 6248a494ab3d0ba11f0834abb1cab9fba6db5456 /test/py/tests/test_fit_ecdsa.py | |
parent | d9ed4b75add4b4ccc37cf32b54cd9c77f48e3396 (diff) |
test/py: Drop importing utils as util
Now that we have a shorter name, we don't need this sort of thing.
Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # test_android
Diffstat (limited to 'test/py/tests/test_fit_ecdsa.py')
-rw-r--r-- | test/py/tests/test_fit_ecdsa.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/py/tests/test_fit_ecdsa.py b/test/py/tests/test_fit_ecdsa.py index 7b25c7779c6..63f2f6a44e6 100644 --- a/test/py/tests/test_fit_ecdsa.py +++ b/test/py/tests/test_fit_ecdsa.py @@ -12,7 +12,7 @@ This test doesn't run the sandbox. It only checks the host tool 'mkimage' import os import pytest -import utils as util +import utils from Cryptodome.Hash import SHA256 from Cryptodome.PublicKey import ECC from Cryptodome.Signature import DSS @@ -25,14 +25,16 @@ class SignableFitImage(object): self.signable_nodes = set() def __fdt_list(self, path): - return util.run_and_log(self.cons, f'fdtget -l {self.fit} {path}') + return utils.run_and_log(self.cons, f'fdtget -l {self.fit} {path}') def __fdt_set(self, node, **prop_value): for prop, value in prop_value.items(): - util.run_and_log(self.cons, f'fdtput -ts {self.fit} {node} {prop} {value}') + utils.run_and_log(self.cons, + f'fdtput -ts {self.fit} {node} {prop} {value}') def __fdt_get_binary(self, node, prop): - numbers = util.run_and_log(self.cons, f'fdtget -tbi {self.fit} {node} {prop}') + numbers = utils.run_and_log(self.cons, + f'fdtget -tbi {self.fit} {node} {prop}') bignum = bytearray() for little_num in numbers.split(): @@ -53,7 +55,7 @@ class SignableFitImage(object): self.__fdt_set(f'{image}/signature', algo='sha256,ecdsa256') def sign(self, mkimage, key_file): - util.run_and_log(self.cons, [mkimage, '-F', self.fit, f'-G{key_file}']) + utils.run_and_log(self.cons, [mkimage, '-F', self.fit, f'-G{key_file}']) def check_signatures(self, key): for image in self.signable_nodes: @@ -76,11 +78,11 @@ def test_fit_ecdsa(ubman): def assemble_fit_image(dest_fit, its, destdir): dtc_args = f'-I dts -O dtb -i {destdir}' - util.run_and_log(cons, [mkimage, '-D', dtc_args, '-f', its, dest_fit]) + utils.run_and_log(cons, [mkimage, '-D', dtc_args, '-f', its, dest_fit]) def dtc(dts): dtb = dts.replace('.dts', '.dtb') - util.run_and_log(cons, f'dtc {datadir}/{dts} -O dtb -o {tempdir}/{dtb}') + utils.run_and_log(cons, f'dtc {datadir}/{dts} -O dtb -o {tempdir}/{dtb}') cons = ubman mkimage = cons.config.build_dir + '/tools/mkimage' |