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:
Vladimir Serbinenko 2016-01-05 12:47:30 +01:00
parent 300be005a8
commit f2b54835f2
2 changed files with 8 additions and 0 deletions

View File

@ -38,11 +38,17 @@ grub_file_progress_hook_real (grub_disk_addr_t sector __attribute__ ((unused)),
grub_uint64_t now;
static grub_uint64_t last_progress_update_time;
grub_file_t file = data;
const char *e;
file->progress_offset += length;
if (call_depth)
return;
e = grub_env_get ("enable_progress_indicator");
if (e && e[0] == '0') {
return;
}
call_depth = 1;
now = grub_get_time_ms ();

View File

@ -289,6 +289,8 @@ fi
cfgfile=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
cat <<EOF >${cfgfile}
grubshell=yes
enable_progress_indicator=0
export enable_progress_indicator
EOF