mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-31 17:17:43 +03:00
test: store empty files rather than symlinks for test-fstab-generator
Dangling symlinks get pruned when packaging up the installation directory. Just store empty files instead, and compare the names rather than the content for .requires/.wants - the filename is what is important anyway, the content is ignored. Fixes #22059
This commit is contained in:
parent
b3c5a7074c
commit
e683878c0f
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
generator=$1
|
||||
@ -30,7 +30,9 @@ for f in "$src"/test-*.input; do
|
||||
sed -i -e 's:ExecStart=/lib/systemd/systemd-fsck:ExecStart=/usr/lib/systemd/systemd-fsck:' "$out"/systemd-fsck-root.service
|
||||
fi
|
||||
|
||||
if ! diff -u "$out" "${f%.input}.expected"; then
|
||||
# We store empty files rather than symlinks, so that they don't get pruned when packaged up, so compare
|
||||
# the list of filenames rather than their content
|
||||
if ! diff -u <(find "$out" -printf '%P\n' | sort) <(find "${f%.input}.expected" -printf '%P\n' | sort); then
|
||||
echo "**** Unexpected output for $f"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
@ -1 +0,0 @@
|
||||
../sysroot.mount
|
Loading…
Reference in New Issue
Block a user