first
This commit is contained in:
28
modules/boot/grub-theme/tests.sh
Normal file
28
modules/boot/grub-theme/tests.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MODULE_GRUB_THEME_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$MODULE_GRUB_THEME_DIR/../../.." && pwd)"
|
||||
|
||||
# shellcheck source=lib/ui.sh
|
||||
source "$PROJECT_ROOT/lib/ui.sh"
|
||||
# shellcheck source=lib/log.sh
|
||||
source "$PROJECT_ROOT/lib/log.sh"
|
||||
# shellcheck source=core/runtime.sh
|
||||
source "$PROJECT_ROOT/core/runtime.sh"
|
||||
# shellcheck source=modules/boot/grub-theme/module.sh
|
||||
source "$MODULE_GRUB_THEME_DIR/module.sh"
|
||||
|
||||
runtime_init "$PROJECT_ROOT"
|
||||
log_init
|
||||
|
||||
if ! test -f /etc/default/grub.d/postinstall-debian.cfg; then
|
||||
printf 'grub-theme test SKIPPED: module configuration not applied\n'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if module_grub_theme_test; then
|
||||
printf 'grub-theme test OK\n'
|
||||
else
|
||||
printf 'grub-theme test FAILED\n' >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user