On Sun, Dec 29, 2019 at 06:46:40PM +0100, Heinrich Schuchardt wrote: > Provide dictionary env__efi_fit_tftp_file describing the file used for the > UEFI FIT image test. > > Cf. "test/py: Create a test for launching UEFI binaries from FIT images" > https://lists.denx.de/pipermail/u-boot/2019-December/394516.html > > Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de> > --- > py/travis-ci/travis_tftp.py | 20 +++++++++++++++++++ > py/travis-ci/u_boot_boardenv_qemu_arm64_na.py | 1 + > py/travis-ci/u_boot_boardenv_qemu_arm_na.py | 1 + > .../u_boot_boardenv_qemu_x86_64_na.py | 2 ++ > py/travis-ci/u_boot_boardenv_qemu_x86_na.py | 2 ++ > .../u_boot_boardenv_vexpress_ca15_tc2_qemu.py | 1 + > .../u_boot_boardenv_vexpress_ca9x4_qemu.py | 1 + > 7 files changed, 28 insertions(+) > > diff --git a/py/travis-ci/travis_tftp.py b/py/travis-ci/travis_tftp.py > index 4ea5c06..2ab7740 100644 > --- a/py/travis-ci/travis_tftp.py > +++ b/py/travis-ci/travis_tftp.py > @@ -1,6 +1,26 @@ > import os > import binascii > > +def efifit2env(addr=None): > + """Create dictionary describing file for UEFI FIT image test > + > + @addr: address used for loading the file as int (e.g. 0x40400000) > + Return: dictionary describing the file with entries > + * fn - filename > + * addr - loading address, optional > + * dn - tftp directory > + """ > + tftp_dir = os.environ['UBOOT_TRAVIS_BUILD_DIR'] + "/" > + > + ret = { > + "fn": "test-efi-fit.img", > + "dn": "tftp_dir",
The quotes around tftp_dir should be removed to allow variable evaluation: "dn": tftp_dir, > + } > + if addr is not None: > + ret['addr'] = addr > + > + return ret > + > def file2env(file_name, addr=None): > """Create dictionary describing file > > diff --git a/py/travis-ci/u_boot_boardenv_qemu_arm64_na.py > b/py/travis-ci/u_boot_boardenv_qemu_arm64_na.py > index 2986115..98ce873 100644 > --- a/py/travis-ci/u_boot_boardenv_qemu_arm64_na.py > +++ b/py/travis-ci/u_boot_boardenv_qemu_arm64_na.py > @@ -6,3 +6,4 @@ env__net_dhcp_server = True > env__net_tftp_readable_file = travis_tftp.file2env('u-boot.bin', 0x40400000) > env__efi_loader_helloworld_file = > travis_tftp.file2env('lib/efi_loader/helloworld.efi', 0x40400000) > env__efi_loader_grub_file = travis_tftp.file2env('grub_arm64.efi', > 0x40400000) > +env__efi_fit_tftp_file = travis_tftp.efifit2env(0x40400000) > diff --git a/py/travis-ci/u_boot_boardenv_qemu_arm_na.py > b/py/travis-ci/u_boot_boardenv_qemu_arm_na.py > index 391e3c4..3dbedde 100644 > --- a/py/travis-ci/u_boot_boardenv_qemu_arm_na.py > +++ b/py/travis-ci/u_boot_boardenv_qemu_arm_na.py > @@ -6,3 +6,4 @@ env__net_dhcp_server = True > env__net_tftp_readable_file = travis_tftp.file2env('u-boot.bin', 0x40400000) > env__efi_loader_helloworld_file = > travis_tftp.file2env('lib/efi_loader/helloworld.efi', 0x40400000) > env__efi_loader_grub_file = travis_tftp.file2env('grub_arm.efi', 0x40400000) > +env__efi_fit_tftp_file = travis_tftp.efifit2env(0x40400000) > diff --git a/py/travis-ci/u_boot_boardenv_qemu_x86_64_na.py > b/py/travis-ci/u_boot_boardenv_qemu_x86_64_na.py > index 6f7c593..2fe72c8 100644 > --- a/py/travis-ci/u_boot_boardenv_qemu_x86_64_na.py > +++ b/py/travis-ci/u_boot_boardenv_qemu_x86_64_na.py > @@ -8,3 +8,5 @@ env__efi_loader_helloworld_file = > travis_tftp.file2env('lib/efi_loader/helloworl > > env__efi_loader_check_smbios = True > env__efi_loader_grub_file = travis_tftp.file2env('grub_x64.efi') > + > +env__efi_fit_tftp_file = travis_tftp.efifit2env() > diff --git a/py/travis-ci/u_boot_boardenv_qemu_x86_na.py > b/py/travis-ci/u_boot_boardenv_qemu_x86_na.py > index 70dc0ae..62cc279 100644 > --- a/py/travis-ci/u_boot_boardenv_qemu_x86_na.py > +++ b/py/travis-ci/u_boot_boardenv_qemu_x86_na.py > @@ -8,3 +8,5 @@ env__efi_loader_helloworld_file = > travis_tftp.file2env('lib/efi_loader/helloworl > > env__efi_loader_check_smbios = True > env__efi_loader_grub_file = travis_tftp.file2env('grub_x86.efi') > + > +env__efi_fit_tftp_file = travis_tftp.efifit2env() > diff --git a/py/travis-ci/u_boot_boardenv_vexpress_ca15_tc2_qemu.py > b/py/travis-ci/u_boot_boardenv_vexpress_ca15_tc2_qemu.py > index 7437ae6..75f287c 100644 > --- a/py/travis-ci/u_boot_boardenv_vexpress_ca15_tc2_qemu.py > +++ b/py/travis-ci/u_boot_boardenv_vexpress_ca15_tc2_qemu.py > @@ -5,3 +5,4 @@ env__net_dhcp_server = True > env__net_tftp_readable_file = travis_tftp.file2env('u-boot') > env__efi_loader_helloworld_file = > travis_tftp.file2env('lib/efi_loader/helloworld.efi') > env__efi_loader_grub_file = travis_tftp.file2env('grub_arm.efi') > +env__efi_fit_tftp_file = travis_tftp.efifit2env() > diff --git a/py/travis-ci/u_boot_boardenv_vexpress_ca9x4_qemu.py > b/py/travis-ci/u_boot_boardenv_vexpress_ca9x4_qemu.py > index 7437ae6..75f287c 100644 > --- a/py/travis-ci/u_boot_boardenv_vexpress_ca9x4_qemu.py > +++ b/py/travis-ci/u_boot_boardenv_vexpress_ca9x4_qemu.py > @@ -5,3 +5,4 @@ env__net_dhcp_server = True > env__net_tftp_readable_file = travis_tftp.file2env('u-boot') > env__efi_loader_helloworld_file = > travis_tftp.file2env('lib/efi_loader/helloworld.efi') > env__efi_loader_grub_file = travis_tftp.file2env('grub_arm.efi') > +env__efi_fit_tftp_file = travis_tftp.efifit2env() > -- > 2.24.1 >