summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-17 14:09:11 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-19 12:36:20 +0100
commit906bbac4747a5adf9a5c3ee7bb1e36d8a35628fc (patch)
tree06852ebba7c46ed711d9ef6d73af8235ad4fda74 /test
parentbootctl: add a convenient way to print the path to EFI (diff)
downloadsystemd-906bbac4747a5adf9a5c3ee7bb1e36d8a35628fc.tar.xz
systemd-906bbac4747a5adf9a5c3ee7bb1e36d8a35628fc.zip
test: do not hardcode location of EFI partition
Diffstat (limited to 'test')
-rw-r--r--test/test-functions9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test-functions b/test/test-functions
index 745c0a9abe..96118ae3ad 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -14,6 +14,7 @@ NSPAWN_TIMEOUT="${NSPAWN_TIMEOUT:-infinity}"
TIMED_OUT= # will be 1 after run_* if *_TIMEOUT is set and test timed out
[[ "$LOOKS_LIKE_SUSE" ]] && FSTYPE="${FSTYPE:-btrfs}" || FSTYPE="${FSTYPE:-ext3}"
UNIFIED_CGROUP_HIERARCHY="${UNIFIED_CGROUP_HIERARCHY:-default}"
+EFI_MOUNT="$(bootctl -p)"
if ! ROOTLIBDIR=$(pkg-config --variable=systemdutildir systemd); then
echo "WARNING! Cannot determine rootlibdir from pkg-config, assuming /usr/lib/systemd" >&2
@@ -61,10 +62,10 @@ function find_qemu_bin() {
run_qemu() {
if [ -f /etc/machine-id ]; then
read MACHINE_ID < /etc/machine-id
- [ -z "$INITRD" ] && [ -e "/boot/$MACHINE_ID/$KERNEL_VER/initrd" ] \
- && INITRD="/boot/$MACHINE_ID/$KERNEL_VER/initrd"
- [ -z "$KERNEL_BIN" ] && [ -e "/boot/$MACHINE_ID/$KERNEL_VER/linux" ] \
- && KERNEL_BIN="/boot/$MACHINE_ID/$KERNEL_VER/linux"
+ [ -z "$INITRD" ] && [ -e "$EFI_MOUNT/$MACHINE_ID/$KERNEL_VER/initrd" ] \
+ && INITRD="$EFI_MOUNT/$MACHINE_ID/$KERNEL_VER/initrd"
+ [ -z "$KERNEL_BIN" ] && [ -e "$EFI_MOUNT/$MACHINE_ID/$KERNEL_VER/linux" ] \
+ && KERNEL_BIN="$EFI_MOUNT/$MACHINE_ID/$KERNEL_VER/linux"
fi
if [[ ! "$KERNEL_BIN" ]]; then