From patchwork Mon Oct 24 04:48:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 617838 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2483488pvb; Sun, 23 Oct 2022 21:49:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7gOwqBH65dTgVFXPsrDeLXQXFOIq/ST5pYcLe57n+OjtR3DUo8laG/Nx2A0GyqrfJ0CckT X-Received: by 2002:a17:907:72c7:b0:791:9ba2:4978 with SMTP id du7-20020a17090772c700b007919ba24978mr24893759ejc.217.1666586968531; Sun, 23 Oct 2022 21:49:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666586968; cv=none; d=google.com; s=arc-20160816; b=VU4LlEJ4ympcOzF0ILfjECHBTWHIw8+xOfr04v6nrf7g5e9W+QcnYG0ywFEFd1oMUK UioAq49bbnD3gizyilMcw5+WgOzKHwdT2UbSWsS3DZLHjccH6s/QdhnkQtM3JOJabQ0t vgWfQejKIdxLDEb0F3+3yxVfgC99I37Vhu97lDESXbMNIdxTudd/wHvpsP+tZvYae/cp Q+tMs2acvS6x3cPkptUCR8zWDR75r4VGCJNzOFu3G5nSNY1Kx8BCxyqwcC4fcTkruicq 8bDDaUy6cr1jVg5v+Iophw0aSSl3CWYFPLLQvP7H9RyEHdRdQazgP0tPrveG6qHFb14W mBQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=a53pVwsVEfddCIlariPO7cWlCs1ay3bu01Fc9GMDt9g=; b=MZXhurVIHpE9HyX1tNESGZ6/w3kk2QgQuT0BkS0a/pm7ZxEgtuU6/FcWBM0QHyx6UD edJUba+BrLVpgSbcp/eNJ1/zssnFDkWVcawLw5qZuvCpui5NkM9r9yvaYZc8dv4vKlmo mnNbJ0d++DinXZqyC40Nq2acTiPJlVyAFPQbJ6DujeGFOvVhkejc5LOj4zBPM337O27H 9lxfIN1ij2aZBK18jBFm1i/FV+b61x6gLwqk1gQyXKRh2wI3QqnuiHMYN/8dZW40OMJt fmWMqmegEnePowT3d/fOIn4nKMA97x46fMYxVoeVAzCtAq6QaX0dFxGvvFLBGvwuqc5b RS+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aZSbvLD4; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id jg16-20020a170907971000b0077d1db6241dsi26015138ejc.762.2022.10.23.21.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Oct 2022 21:49:28 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aZSbvLD4; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6B85084F58; Mon, 24 Oct 2022 06:48:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="aZSbvLD4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 44AD784225; Mon, 24 Oct 2022 06:48:07 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B92E484F4B for ; Mon, 24 Oct 2022 06:47:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masahisa.kojima@linaro.org Received: by mail-pf1-x429.google.com with SMTP id d10so8070665pfh.6 for ; Sun, 23 Oct 2022 21:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=a53pVwsVEfddCIlariPO7cWlCs1ay3bu01Fc9GMDt9g=; b=aZSbvLD4Ese948fQBppFkJboO3AYysZKP2xS0lX6tea3/gKumnwfVyEOZ/Efjbi4Af chEcb6edockQ0ROTlxHM8mmZMksjvW3gXkMshZgjdDvXZU69+Zm7VKFK9jgr+EFYnF6D RJb/oioD4A5IlOThzdybgTIKGAUl4nBDHiZ5S2jVPBxqhbe64j0SbRf0Q376A0JHQ//R qNK5R5uanttEke0mNBODpjs2VnX7lqv5r5BvZcs8huwo6MT/wofMh37Fjs/iwKPY6tro Jq8SncEiGIWc5iL3bGydZepVGEklwqMXQ9trh/0CbZ6K0gSS9/2zOdSUcLBX+fGWLXi2 0lqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=a53pVwsVEfddCIlariPO7cWlCs1ay3bu01Fc9GMDt9g=; b=IoEgYOtXvZ6WyxNmLNFtUTxeAMvTa4mdHWCpjfl4M6Fz28MHF9fPM6wiDcoXZx8nQ4 rMAG9qL0NX9mZYveJautfrCKKH3OSiD4s4TM40JCyU93QwcLPgHCE9jsfraRelyuXXcN C0P0kCtmmt5vUFqAJs0LvQEcCbim9eMNvQhC15loRI4jPd5M02xNYhXaRhFRy9PKSsOl nZ+Jvgi5yxgDg4nOz7IJI5C/L6CuSD7J/yldB5r+3JOdjK4QYuM9i4T94F4FZv3DbtKh FjunuUiJ1MRA6RDXNTqgAjtwV4MBUSAyl4xzy2N6PWpf6S+5Aaqr18ieBNZW8pG6+NL2 Ah0w== X-Gm-Message-State: ACrzQf2YaPkJnyGH2CRZe7rftO35iqQHOqStizV6LtiQV6em29UwRrfr rNnSRv/V7Vr7uvsKsKU6iiuvI/OZyP/SNg== X-Received: by 2002:a05:6a00:22c3:b0:56b:f793:5ad1 with SMTP id f3-20020a056a0022c300b0056bf7935ad1mr368983pfj.58.1666586874392; Sun, 23 Oct 2022 21:47:54 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id i72-20020a62874b000000b0056b932f3280sm3213979pfe.103.2022.10.23.21.47.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Oct 2022 21:47:53 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Masahisa Kojima Subject: [PATCH v4 7/7] test/py: eficonfig: use direct menu entry access mode Date: Mon, 24 Oct 2022 13:48:04 +0900 Message-Id: <20221024044804.3351-8-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221024044804.3351-1-masahisa.kojima@linaro.org> References: <20221024044804.3351-1-masahisa.kojima@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean To select the menu entry, use direct access mode instead of UP/DOWN key operation. Signed-off-by: Masahisa Kojima --- Newly added in v4 .../py/tests/test_eficonfig/test_eficonfig.py | 177 +++++++----------- 1 file changed, 70 insertions(+), 107 deletions(-) diff --git a/test/py/tests/test_eficonfig/test_eficonfig.py b/test/py/tests/test_eficonfig/test_eficonfig.py index 102bfd7541..dc08a35216 100644 --- a/test/py/tests/test_eficonfig/test_eficonfig.py +++ b/test/py/tests/test_eficonfig/test_eficonfig.py @@ -11,7 +11,7 @@ import time def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): def send_user_input_and_wait(user_str, expect_str): - time.sleep(0.1) # TODO: does not work correctly without sleep + time.sleep(0.3) # TODO: does not work correctly without sleep u_boot_console.run_command(cmd=user_str, wait_for_prompt=False, wait_for_echo=True, send_nl=False) u_boot_console.run_command(cmd='\x0d', wait_for_prompt=False, @@ -20,20 +20,13 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): for i in expect_str: u_boot_console.p.expect([i]) - def press_up_down_enter_and_wait(up_count, down_count, enter, expect_str): - # press UP key - for i in range(up_count): - u_boot_console.run_command(cmd='\x1b\x5b\x41', wait_for_prompt=False, + def select_entry_and_wait(name, expect_str): + u_boot_console.run_command(cmd='&', wait_for_prompt=False, wait_for_echo=False, send_nl=False) - # press DOWN key - for i in range(down_count): - u_boot_console.run_command(cmd='\x1b\x5b\x42', wait_for_prompt=False, - wait_for_echo=False, send_nl=False) - # press ENTER if requested - if enter: - u_boot_console.run_command(cmd='\x0d', wait_for_prompt=False, + u_boot_console.run_command(cmd=name, wait_for_prompt=False, + wait_for_echo=True, send_nl=False) + u_boot_console.run_command(cmd='\x0d', wait_for_prompt=False, wait_for_echo=False, send_nl=False) - # wait expected output if expect_str is not None: for i in expect_str: u_boot_console.p.expect([i]) @@ -76,11 +69,12 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): for i in ('UEFI Maintenance Menu', 'Add Boot Option', 'Edit Boot Option', 'Change Boot Order', 'Delete Boot Option', 'Quit'): u_boot_console.p.expect([i]) - # Select "Add Boot Option" - press_enter_key(False) + + select_entry_and_wait('Add Boot', None) for i in ('Add Boot Option', 'Description:', 'File', 'Initrd File', 'Optional Data', 'Save', 'Quit'): u_boot_console.p.expect([i]) + press_escape_key(False) check_current_is_maintenance_menu() # return to U-Boot console @@ -95,55 +89,43 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): u_boot_console.run_command('eficonfig', wait_for_prompt=False) - # Change the Boot Order - press_up_down_enter_and_wait(0, 2, True, 'Quit') - for i in ('host 0:1', 'Save', 'Quit'): - u_boot_console.p.expect([i]) + select_entry_and_wait('Change Boot', 'Quit') # disable auto generated boot option for succeeding test + select_entry_and_wait('host 0:1', None) u_boot_console.run_command(cmd=' ', wait_for_prompt=False, wait_for_echo=False, send_nl=False) - # Save the BootOrder - press_up_down_enter_and_wait(0, 1, True, None) + select_entry_and_wait('Save', None) check_current_is_maintenance_menu() # # Test Case 3: Add first Boot Option and load it # - # Select 'Add Boot Option' - press_up_down_enter_and_wait(0, 0, True, 'Quit') - - # Press the enter key to select 'Description:' entry, then enter Description - press_up_down_enter_and_wait(0, 0, True, 'enter description:') - # Send Description user input, press ENTER key to complete + # Set Description + select_entry_and_wait('Add Boot', 'Quit') + select_entry_and_wait('Description', 'enter description:') send_user_input_and_wait('test 1', 'Quit') # Set EFI image(initrddump.efi) - press_up_down_enter_and_wait(0, 1, True, 'Quit') - press_up_down_enter_and_wait(0, 0, True, 'host 0:1') - # Select 'host 0:1' - press_up_down_enter_and_wait(0, 0, True, 'Quit') - # Press down key to select "initrddump.efi" entry followed by the enter key - press_up_down_enter_and_wait(0, 2, True, 'Quit') + select_entry_and_wait('File:', 'Quit') + select_entry_and_wait('Select File', 'Quit') + select_entry_and_wait('host 0:1', 'Quit') + select_entry_and_wait('initrddump.efi', 'Quit') # Set Initrd file(initrd-1.img) - press_up_down_enter_and_wait(0, 2, True, 'Quit') - press_up_down_enter_and_wait(0, 0, True, 'host 0:1') - # Select 'host 0:1' - press_up_down_enter_and_wait(0, 0, True, 'Quit') - # Press down key to select "initrd-1.img" entry followed by the enter key - press_up_down_enter_and_wait(0, 0, True, 'Quit') + select_entry_and_wait('Initrd File:', 'Quit') + select_entry_and_wait('Select File', 'Quit') + select_entry_and_wait('host 0:1', 'Quit') + select_entry_and_wait('initrd-1.img', 'Quit') # Set optional_data - press_up_down_enter_and_wait(0, 3, True, 'Optional Data:') - # Send Description user input, press ENTER key to complete + select_entry_and_wait('Optional Data:', 'Optional Data:') send_user_input_and_wait('nocolor', None) for i in ('Description: test 1', 'File: host 0:1/initrddump.efi', 'Initrd File: host 0:1/initrd-1.img', 'Optional Data: nocolor', 'Save', 'Quit'): u_boot_console.p.expect([i]) - # Save the Boot Option - press_up_down_enter_and_wait(0, 4, True, None) + select_entry_and_wait('Save', None) check_current_is_maintenance_menu() # Check the newly added Boot Option is handled correctly @@ -159,51 +141,42 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): # u_boot_console.run_command('eficonfig', wait_for_prompt=False) - # Select 'Add Boot Option' - press_up_down_enter_and_wait(0, 0, True, 'Quit') - - # Press the enter key to select 'Description:' entry, then enter Description - press_up_down_enter_and_wait(0, 0, True, 'enter description:') - # Send Description user input, press ENTER key to complete + # Set Description + select_entry_and_wait('Add Boot', 'Quit') + select_entry_and_wait('Description', 'enter description:') send_user_input_and_wait('test 2', 'Quit') # Set EFI image(initrddump.efi) - press_up_down_enter_and_wait(0, 1, True, 'Quit') - press_up_down_enter_and_wait(0, 0, True, 'host 0:1') - # Select 'host 0:1' - press_up_down_enter_and_wait(0, 0, True, 'Quit') - # Press down key to select "initrddump.efi" entry followed by the enter key - press_up_down_enter_and_wait(0, 2, True, 'Quit') + select_entry_and_wait('File:', 'Quit') + select_entry_and_wait('Select File', 'Quit') + select_entry_and_wait('host 0:1', 'Quit') + select_entry_and_wait('initrddump.efi', 'Quit') # Set Initrd file(initrd-2.img) - press_up_down_enter_and_wait(0, 2, True, 'Quit') - press_up_down_enter_and_wait(0, 0, True, 'host 0:1') - # Select 'host 0:1' - press_up_down_enter_and_wait(0, 0, True, 'Quit') - # Press down key to select "initrd-2.img" entry followed by the enter key - press_up_down_enter_and_wait(0, 1, True, 'Quit') + select_entry_and_wait('Initrd File:', 'Quit') + select_entry_and_wait('Select File', 'Quit') + select_entry_and_wait('host 0:1', 'Quit') + select_entry_and_wait('initrd-2.img', 'Quit') # Set optional_data - press_up_down_enter_and_wait(0, 3, True, 'Optional Data:') - # Send Description user input, press ENTER key to complete + select_entry_and_wait('Optional Data:', 'Optional Data:') send_user_input_and_wait('nocolor', None) for i in ('Description: test 2', 'File: host 0:1/initrddump.efi', 'Initrd File: host 0:1/initrd-2.img', 'Optional Data: nocolor', 'Save', 'Quit'): u_boot_console.p.expect([i]) - # Save the Boot Option - press_up_down_enter_and_wait(0, 4, True, 'Quit') + select_entry_and_wait('Save', None) + check_current_is_maintenance_menu() - # Change the Boot Order - press_up_down_enter_and_wait(0, 2, True, 'Quit') - press_up_down_enter_and_wait(0, 1, False, 'Quit') - # move 'test 1' to the second entry + select_entry_and_wait('Change Boot', 'Quit') + # move 'test 2' to the first entry + select_entry_and_wait('test 2', 'Quit') u_boot_console.run_command(cmd='+', wait_for_prompt=False, wait_for_echo=False, send_nl=False) for i in ('test 2', 'test 1', 'host 0:1', 'Save', 'Quit'): u_boot_console.p.expect([i]) - # Save the BootOrder - press_up_down_enter_and_wait(0, 3, True, None) + + select_entry_and_wait('Save', None) check_current_is_maintenance_menu() # Check the newly added Boot Option is handled correctly @@ -219,18 +192,18 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): # u_boot_console.run_command('eficonfig', wait_for_prompt=False) - # Change the Boot Order - press_up_down_enter_and_wait(0, 2, True, None) + select_entry_and_wait('Change Boot', 'Quit') # Check the curren BootOrder for i in ('test 2', 'test 1', 'host 0:1', 'Save', 'Quit'): u_boot_console.p.expect([i]) # move 'test 2' to the second entry + select_entry_and_wait('test 2', 'Quit') u_boot_console.run_command(cmd='-', wait_for_prompt=False, wait_for_echo=False, send_nl=False) for i in ('test 1', 'test 2', 'host 0:1', 'Save', 'Quit'): u_boot_console.p.expect([i]) - # Save the BootOrder - press_up_down_enter_and_wait(0, 2, True, None) + + select_entry_and_wait('Save', 'Quit') check_current_is_maintenance_menu() # Return to U-Boot console @@ -245,14 +218,13 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): # u_boot_console.run_command('eficonfig', wait_for_prompt=False) - # Select 'Delete Boot Option' - press_up_down_enter_and_wait(0, 3, True, None) + select_entry_and_wait('Delete Boot', 'Quit') # Check the current BootOrder for i in ('test 1', 'test 2', 'Quit'): u_boot_console.p.expect([i]) # Delete 'test 2' - press_up_down_enter_and_wait(0, 1, True, None) + select_entry_and_wait('test 2', 'Quit') for i in ('test 1', 'Quit'): u_boot_console.p.expect([i]) press_escape_key(False) @@ -264,47 +236,40 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): # Test Case 7: Edit Boot Option # u_boot_console.run_command('eficonfig', wait_for_prompt=False) - # Select 'Edit Boot Option' - press_up_down_enter_and_wait(0, 1, True, None) + + select_entry_and_wait('Edit Boot', 'Quit') # Check the curren BootOrder for i in ('test 1', 'Quit'): u_boot_console.p.expect([i]) - press_up_down_enter_and_wait(0, 0, True, None) + select_entry_and_wait('test 1', 'Quit') for i in ('Description: test 1', 'File: host 0:1/initrddump.efi', 'Initrd File: host 0:1/initrd-1.img', 'Optional Data: nocolor', 'Save', 'Quit'): u_boot_console.p.expect([i]) - # Press the enter key to select 'Description:' entry, then enter Description - press_up_down_enter_and_wait(0, 0, True, 'enter description:') - # Send Description user input, press ENTER key to complete + # Set Description + select_entry_and_wait('Description', 'enter description:') send_user_input_and_wait('test 3', 'Quit') # Set EFI image(initrddump.efi) - press_up_down_enter_and_wait(0, 1, True, 'Quit') - press_up_down_enter_and_wait(0, 0, True, 'host 0:1') - # Select 'host 0:1' - press_up_down_enter_and_wait(0, 0, True, 'Quit') - # Press down key to select "initrddump.efi" entry followed by the enter key - press_up_down_enter_and_wait(0, 2, True, 'Quit') + select_entry_and_wait('File:', 'Quit') + select_entry_and_wait('Select File', 'Quit') + select_entry_and_wait('host 0:1', 'Quit') + select_entry_and_wait('initrddump.efi', 'Quit') # Set Initrd file(initrd-2.img) - press_up_down_enter_and_wait(0, 2, True, 'Quit') - press_up_down_enter_and_wait(0, 0, True, 'host 0:1') - # Select 'host 0:1' - press_up_down_enter_and_wait(0, 0, True, 'Quit') - # Press down key to select "initrd-1.img" entry followed by the enter key - press_up_down_enter_and_wait(0, 1, True, 'Quit') + select_entry_and_wait('Initrd File:', 'Quit') + select_entry_and_wait('Select File', 'Quit') + select_entry_and_wait('host 0:1', 'Quit') + select_entry_and_wait('initrd-2.img', 'Quit') # Set optional_data - press_up_down_enter_and_wait(0, 3, True, 'Optional Data:') - # Send Description user input, press ENTER key to complete + select_entry_and_wait('Optional Data:', 'Optional Data:') send_user_input_and_wait('', None) for i in ('Description: test 3', 'File: host 0:1/initrddump.efi', 'Initrd File: host 0:1/initrd-2.img', 'Optional Data:', 'Save', 'Quit'): u_boot_console.p.expect([i]) - # Save the Boot Option - press_up_down_enter_and_wait(0, 4, True, 'Quit') + select_entry_and_wait('Save', None) press_escape_key(False) check_current_is_maintenance_menu() @@ -321,14 +286,13 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): # u_boot_console.run_command('eficonfig', wait_for_prompt=False) - # Select 'Delete Boot Option' - press_up_down_enter_and_wait(0, 3, True, None) + select_entry_and_wait('Delete Boot', 'Quit') # Check the curren BootOrder for i in ('test 3', 'Quit'): u_boot_console.p.expect([i]) # Delete 'test 3' - press_up_down_enter_and_wait(0, 0, True, 'Quit') + select_entry_and_wait('test 3', 'Quit') press_escape_key(False) check_current_is_maintenance_menu() # Return to U-Boot console @@ -342,12 +306,11 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data): # u_boot_console.run_command('eficonfig', wait_for_prompt=False) - # Select 'Add Boot Option' - press_up_down_enter_and_wait(0, 0, True, 'Quit') + select_entry_and_wait('Add Boot', 'Quit') # Set EFI image - press_up_down_enter_and_wait(0, 1, True, 'Quit') - press_up_down_enter_and_wait(0, 0, True, 'No block device found!') + select_entry_and_wait('File:', 'Quit') + select_entry_and_wait('Select File', 'No block device found!') press_escape_key(False) press_escape_key(False) check_current_is_maintenance_menu()