Disable progress indicator in grub-shell.
This disables progress indicator for tests. This in turn fixes test flakiness as they ended up timing-dependent.
This commit is contained in:
parent
300be005a8
commit
f2b54835f2
2 changed files with 8 additions and 0 deletions
|
@ -38,11 +38,17 @@ grub_file_progress_hook_real (grub_disk_addr_t sector __attribute__ ((unused)),
|
||||||
grub_uint64_t now;
|
grub_uint64_t now;
|
||||||
static grub_uint64_t last_progress_update_time;
|
static grub_uint64_t last_progress_update_time;
|
||||||
grub_file_t file = data;
|
grub_file_t file = data;
|
||||||
|
const char *e;
|
||||||
file->progress_offset += length;
|
file->progress_offset += length;
|
||||||
|
|
||||||
if (call_depth)
|
if (call_depth)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
e = grub_env_get ("enable_progress_indicator");
|
||||||
|
if (e && e[0] == '0') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
call_depth = 1;
|
call_depth = 1;
|
||||||
now = grub_get_time_ms ();
|
now = grub_get_time_ms ();
|
||||||
|
|
||||||
|
|
|
@ -289,6 +289,8 @@ fi
|
||||||
cfgfile=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
|
cfgfile=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
|
||||||
cat <<EOF >${cfgfile}
|
cat <<EOF >${cfgfile}
|
||||||
grubshell=yes
|
grubshell=yes
|
||||||
|
enable_progress_indicator=0
|
||||||
|
export enable_progress_indicator
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue