aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass2021-07-24 15:14:39 -0600
committerSimon Glass2021-08-01 09:05:24 -0600
commitcb8970092f2cd5f1eaadf7d15d28cb905067e07f (patch)
treefbc4925e478f7bb40f24bb09dbb1da8d4e33da3f /common
parentea40b20431c0c5de1856c56f965757a40df8d3d7 (diff)
sandbox: Reduce keyed autoboot delay
The autoboot tests are a recent addition to U-Boot, providing much-needed coverage in this area. A side effect of the keyed autoboot test is that this feature is enabled in sandbox always. This changes the autoboot prompt and confuses the pytests. Some tests become slower, for example the vboot tests take about 27s now instead of 3s. We don't actually need this feature enabled to be able to run the tests. Add a switch to allow sandbox to turn it on and off as needed. Use this in the one test that needs it. Add a command-line flag in case this is desired in normal use. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 25c8b9f298e ("test: add first autoboot unit tests") Reviewed-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
Diffstat (limited to 'common')
-rw-r--r--common/autoboot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/autoboot.c b/common/autoboot.c
index 8b9e9aa8785..5bb2e190895 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -406,7 +406,7 @@ static int abortboot(int bootdelay)
int abort = 0;
if (bootdelay >= 0) {
- if (IS_ENABLED(CONFIG_AUTOBOOT_KEYED))
+ if (autoboot_keyed())
abort = abortboot_key_sequence(bootdelay);
else
abort = abortboot_single_key(bootdelay);
@@ -481,7 +481,7 @@ void autoboot_command(const char *s)
bool lock;
int prev;
- lock = IS_ENABLED(CONFIG_AUTOBOOT_KEYED) &&
+ lock = autoboot_keyed() &&
!IS_ENABLED(CONFIG_AUTOBOOT_KEYED_CTRLC);
if (lock)
prev = disable_ctrlc(1); /* disable Ctrl-C checking */
@@ -498,4 +498,4 @@ void autoboot_command(const char *s)
if (s)
run_command_list(s, -1, 0);
}
-} \ No newline at end of file
+}