test/py: Drop assigning ubman to cons
Now that we have a shorter name, we don't need this sort of thing. Just
use ubman instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/py/tests/test_fit_hashes.py b/test/py/tests/test_fit_hashes.py
index bcde045..07bf0fd 100644
--- a/test/py/tests/test_fit_hashes.py
+++ b/test/py/tests/test_fit_hashes.py
@@ -26,20 +26,20 @@
class ReadonlyFitImage(object):
""" Helper to manipulate a FIT image on disk """
- def __init__(self, cons, file_name):
+ def __init__(self, ubman, file_name):
self.fit = file_name
- self.cons = cons
+ self.ubman = ubman
self.hashable_nodes = set()
def __fdt_list(self, path):
- return utils.run_and_log(self.cons, f'fdtget -l {self.fit} {path}')
+ return utils.run_and_log(self.ubman, f'fdtget -l {self.fit} {path}')
def __fdt_get(self, node, prop):
- val = utils.run_and_log(self.cons, f'fdtget {self.fit} {node} {prop}')
+ val = utils.run_and_log(self.ubman, f'fdtget {self.fit} {node} {prop}')
return val.rstrip('\n')
def __fdt_get_sexadecimal(self, node, prop):
- numbers = utils.run_and_log(self.cons,
+ numbers = utils.run_and_log(self.ubman,
f'fdtget -tbx {self.fit} {node} {prop}')
sexadecimal = ''
@@ -86,17 +86,16 @@
def assemble_fit_image(dest_fit, its, destdir):
dtc_args = f'-I dts -O dtb -i {destdir}'
- utils.run_and_log(cons, [mkimage, '-D', dtc_args, '-f', its, dest_fit])
+ utils.run_and_log(ubman, [mkimage, '-D', dtc_args, '-f', its, dest_fit])
def dtc(dts):
dtb = dts.replace('.dts', '.dtb')
- utils.run_and_log(cons,
+ utils.run_and_log(ubman,
f'dtc {datadir}/{dts} -O dtb -o {tempdir}/{dtb}')
- cons = ubman
- mkimage = cons.config.build_dir + '/tools/mkimage'
- datadir = cons.config.source_dir + '/test/py/tests/vboot/'
- tempdir = os.path.join(cons.config.result_dir, 'hashes')
+ mkimage = ubman.config.build_dir + '/tools/mkimage'
+ datadir = ubman.config.source_dir + '/test/py/tests/vboot/'
+ tempdir = os.path.join(ubman.config.result_dir, 'hashes')
os.makedirs(tempdir, exist_ok=True)
fit_file = f'{tempdir}/test.fit'
@@ -108,7 +107,7 @@
assemble_fit_image(fit_file, f'{datadir}/hash-images.its', tempdir)
- fit = ReadonlyFitImage(cons, fit_file)
+ fit = ReadonlyFitImage(ubman, fit_file)
nodes = fit.find_hashable_image_nodes()
if len(nodes) == 0:
raise ValueError('FIT image has no "/image" nodes with "hash-..."')