summaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-06-19 15:02:18 +0300
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-06-19 16:53:09 +0300
commite05bd68ed5fcbcd857f5a072f469886fb627fe97 (patch)
tree8ee9a352fe524919c856626e7142752ebb66b0eb /test/py
parenta872b18a0f0365c7dd45239f85b4f7ffed3a6781 (diff)
downloadu-boot-e05bd68ed5fcbcd857f5a072f469886fb627fe97.tar.xz
test: work around for EFI terminal size probing
When the UEFI sub-system is initialized it sends an escape sequence to the serial console to determine the terminal size. This stops the run_command_list() function of the console emulation from recognizing the U-Boot command line prompt. Add a 'print -e' command as first command in the command list to work around this issue. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'test/py')
-rw-r--r--test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py1
-rw-r--r--test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py b/test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py
index 5bef84958b..8f75b554ad 100644
--- a/test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py
+++ b/test/py/tests/test_efi_capsule/test_capsule_firmware_fit.py
@@ -117,6 +117,7 @@ class TestEfiCapsuleFirmwareFit(object):
with u_boot_console.log.section('Test Case 2-a, before reboot'):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
+ 'printenv -e PlatformLangCodes', # workaround for terminal size determination
'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi -s ""',
'efidebug boot order 1',
'env set -e -nv -bs -rt OsIndications =0x0000000000000004',
diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py b/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py
index c8c647d0b1..92bfb14932 100644
--- a/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py
+++ b/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py
@@ -115,6 +115,7 @@ class TestEfiCapsuleFirmwareRaw:
with u_boot_console.log.section('Test Case 2-a, before reboot'):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
+ 'printenv -e PlatformLangCodes', # workaround for terminal size determination
'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi -s ""',
'efidebug boot order 1',
'env set -e OsIndications',
@@ -197,6 +198,7 @@ class TestEfiCapsuleFirmwareRaw:
with u_boot_console.log.section('Test Case 3-a, before reboot'):
output = u_boot_console.run_command_list([
'host bind 0 %s' % disk_img,
+ 'printenv -e PlatformLangCodes', # workaround for terminal size determination
'efidebug boot add -b 1 TEST host 0:1 /helloworld.efi -s ""',
'efidebug boot order 1',
'env set -e -nv -bs -rt OsIndications =0x0000000000000004',