
From: Simon Glass <sjg@chromium.org> This test should create its own files rather than relying on those created by test_vboot_base(). Copy the code in the test. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/py/tests/test_vboot.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py index 77b1523fbc0..06229db41dd 100644 --- a/test/py/tests/test_vboot.py +++ b/test/py/tests/test_vboot.py @@ -640,12 +640,22 @@ def test_fdt_add_pubkey(ubman, name, sha_algo, padding, sign_options, algo_arg): datadir = ubman.config.source_dir + '/test/py/tests/vboot/' fit = '%stest.fit' % tmpdir mkimage = ubman.config.build_dir + '/tools/mkimage' - binman = ubman.config.source_dir + '/tools/binman/binman' fit_check_sign = ubman.config.build_dir + '/tools/fit_check_sign' fdt_add_pubkey = ubman.config.build_dir + '/tools/fdt_add_pubkey' dtc_args = '-I dts -O dtb -i %s' % tmpdir dtb = '%ssandbox-u-boot.dtb' % tmpdir - # keys created in test_vboot test + create_rsa_pair(ubman, 'dev', sha_algo, tmpdir) + create_rsa_pair(ubman, 'prod', sha_algo, tmpdir) + + # Create a number kernel image with zeroes + with open(f'{tmpdir}test-kernel.bin', 'wb') as fd: + fd.write(500 * b'\0') + + # Compile our device tree files for kernel and U-Boot. These are + # regenerated here since mkimage will modify them (by adding a + # public key) below. + dtc('sandbox-kernel.dts', ubman, dtc_args, datadir, tmpdir, dtb) + dtc('sandbox-u-boot.dts', ubman, dtc_args, datadir, tmpdir, dtb) test_add_pubkey(sha_algo, padding, sign_options) -- 2.43.0