Some capsule tests are changing the sandbox DT to test various features,
e.g authenticated capsule updates, versioning support etc. However, no one
restores the original DT and the CI pops errors looking like
/u-boot
Bloblist at 100 not found (err=-2)
Failed to find FDT file '/tmp/sandbox/persistent-data/scratch/EFI/CapsuleTestData/test_ver.dtb'
initcall_run_f(): initcall fdtdec_setup() failed
if sandbox is restarted.
So let's restore the proper DT after done with the capsule testing.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
dtb_filename -- DTB file name.
"""
mnt_point = u_boot_config.persistent_data_dir + '/scratch'
+ old_dtb = ubman.config.dtb
ubman.config.dtb = mnt_point + CAPSULE_DATA_DIR \
+ f'/{dtb_filename}'
ubman.restart_uboot()
+ ubman.config.dtb = old_dtb