]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test/test-functions: move var assignment
authorDan Streetman <ddstreet@canonical.com>
Tue, 17 Nov 2020 21:02:14 +0000 (16:02 -0500)
committerDan Streetman <ddstreet@canonical.com>
Tue, 26 Jan 2021 21:05:49 +0000 (16:05 -0500)
This makes no code change, only moves a small block of vars higher in the
file. This makes the next commit a bit easier to read.

test/test-functions

index 837082890a0bcdb04c12d953c83c69bf85a74daf..f6a824ae693b4a085d34fe8fb802cc18cb5db566 100644 (file)
@@ -50,6 +50,11 @@ PATH_TO_INIT=$ROOTLIBDIR/systemd
 [ "$SYSTEMD_NSPAWN" ] || SYSTEMD_NSPAWN=$(which -a $BUILD_DIR/systemd-nspawn systemd-nspawn 2>/dev/null | grep '^/' -m1)
 [ "$JOURNALCTL" ] || JOURNALCTL=$(which -a $BUILD_DIR/journalctl journalctl 2>/dev/null | grep '^/' -m1)
 
+STATEDIR="${BUILD_DIR:-.}/test/$(basename $(dirname $(realpath $0)))"
+STATEFILE="$STATEDIR/.testdir"
+IMAGESTATEDIR="$STATEDIR/.."
+TESTLOG="$STATEDIR/test.log"
+
 BASICTOOLS=(
     awk
     basename
@@ -148,11 +153,6 @@ DEBUGTOOLS=(
     vi
 )
 
-STATEDIR="${BUILD_DIR:-.}/test/$(basename $(dirname $(realpath $0)))"
-STATEFILE="$STATEDIR/.testdir"
-IMAGESTATEDIR="$STATEDIR/.."
-TESTLOG="$STATEDIR/test.log"
-
 is_built_with_asan() {
     if ! type -P objdump >/dev/null; then
         ddebug "Failed to find objdump. Assuming systemd hasn't been built with ASAN."