mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-23 21:35:26 +03:00
tests: don't create a syslinux stub unconditionally in libtest
libtest.sh has an setup_os_repository() helper function tha is used by many tests to setup an OSTree initial repository. This function creates an syslinux configuration unconditionally but OSTree supports other bootloader backends besides syslinux. So, is better to conditionally create a syslinux configuration only when it is needed. https://bugzilla.gnome.org/show_bug.cgi?id=708069 Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
This commit is contained in:
parent
d302c3d7ff
commit
f19ba12360
@ -155,8 +155,19 @@ setup_fake_remote_repo1() {
|
||||
export OSTREE="ostree --repo=repo"
|
||||
}
|
||||
|
||||
setup_os_boot_syslinux() {
|
||||
# Stub syslinux configuration
|
||||
mkdir -p sysroot/boot/loader.0
|
||||
ln -s loader.0 sysroot/boot/loader
|
||||
touch sysroot/boot/loader/syslinux.cfg
|
||||
# And a compatibility symlink
|
||||
mkdir -p sysroot/boot/syslinux
|
||||
ln -s ../loader/syslinux.cfg sysroot/boot/syslinux/syslinux.cfg
|
||||
}
|
||||
|
||||
setup_os_repository () {
|
||||
mode=$1
|
||||
bootmode=$2
|
||||
shift
|
||||
|
||||
oldpwd=`pwd`
|
||||
@ -207,13 +218,9 @@ EOF
|
||||
ostree admin --sysroot=sysroot init-fs sysroot
|
||||
ostree admin --sysroot=sysroot os-init testos
|
||||
|
||||
# Stub syslinux configuration
|
||||
mkdir -p sysroot/boot/loader.0
|
||||
ln -s loader.0 sysroot/boot/loader
|
||||
touch sysroot/boot/loader/syslinux.cfg
|
||||
# And a compatibility symlink
|
||||
mkdir -p sysroot/boot/syslinux
|
||||
ln -s ../loader/syslinux.cfg sysroot/boot/syslinux/syslinux.cfg
|
||||
if [ $bootmode = "syslinux" ]; then
|
||||
setup_os_boot_syslinux
|
||||
fi
|
||||
}
|
||||
|
||||
os_repository_new_commit ()
|
||||
|
@ -23,7 +23,7 @@ set -e
|
||||
|
||||
echo "1..1"
|
||||
|
||||
setup_os_repository "archive-z2"
|
||||
setup_os_repository "archive-z2" "syslinux"
|
||||
|
||||
echo "ok setup"
|
||||
|
||||
|
@ -23,7 +23,7 @@ set -e
|
||||
|
||||
echo "1..1"
|
||||
|
||||
setup_os_repository "archive-z2"
|
||||
setup_os_repository "archive-z2" "syslinux"
|
||||
|
||||
echo "ok setup"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user