diff options
author | Gatis Paeglis <gatis.paeglis@theqtcompany.com> | 2016-04-01 13:51:18 +0200 |
---|---|---|
committer | Colin Walters (automation) <walters+githubbot@verbum.org> | 2016-04-04 14:19:35 +0000 |
commit | 4e815484470fb22a1b0dc52af0193d5ce1a3caf7 (patch) | |
tree | 6c6c0262c3543ac90a2c441af5992f4e579f6b84 /tests/admin-test.sh | |
parent | 826c2149b8e1c7be7277d9e558680139e9fd0ab7 (diff) | |
download | ostree-4e815484470fb22a1b0dc52af0193d5ce1a3caf7.tar.gz |
Introducing ostree-grub-generator
ostree-grub-generator can be used to customize
the generated grub.cfg file. Compile time
decision ostree-grub-generator vs grub2-mkconfig
can be overwritten with the OSTREE_GRUB2_EXEC
envvar - useful for auto tests and OS installers.
Why this alternative approach:
1) The current approach is less flexible than using a
custom 'ostree-grub-generator' script. Each system can
adjust this script for its needs, instead of using the
hardcoded values from ostree-bootloader-grub2.c.
2) Too much overhead on embedded to generate grub.cfg
via /etc/grub.d/ configuration files. It is still
possible to do so, even with this patch applied.
No need to install grub2 package on a target device.
3) The grub2-mkconfig code path has other issues:
https://bugzilla.gnome.org/show_bug.cgi?id=761180
Task: https://bugzilla.gnome.org/show_bug.cgi?id=762220
Closes: #228
Approved by: cgwalters
Diffstat (limited to 'tests/admin-test.sh')
-rwxr-xr-x | tests/admin-test.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/admin-test.sh b/tests/admin-test.sh index 43dcbb55..dcc34068 100755 --- a/tests/admin-test.sh +++ b/tests/admin-test.sh @@ -21,10 +21,17 @@ set -euo pipefail echo "1..16" function validate_bootloader() { - (cd ${test_tmpdir}; - if test -f sysroot/boot/syslinux/syslinux.cfg; then - $(dirname $0)/syslinux-entries-crosscheck.py sysroot - fi) + cd ${test_tmpdir}; + bootloader="" + if test -f sysroot/boot/syslinux/syslinux.cfg; then + bootloader="syslinux" + elif test -f sysroot/boot/grub2/grub.cfg; then + bootloader="grub2" + fi + if test -n "${bootloader}"; then + $(dirname $0)/bootloader-entries-crosscheck.py sysroot ${bootloader} + fi + cd - } orig_mtime=$(stat -c '%.Y' sysroot/ostree/deploy) |