From: Frantisek Sumsal Date: Mon, 15 May 2023 08:06:18 +0000 (+0200) Subject: test: pass $BUILD_DIR as $COVERAGE_BUILD_DIR to the system manager X-Git-Tag: v254-rc1~482^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=786f6d81f7b70dd313711bcb9e285ecea516eadd;p=thirdparty%2Fsystemd.git test: pass $BUILD_DIR as $COVERAGE_BUILD_DIR to the system manager To make additional coverage-related tweaks slightly easier. --- diff --git a/test/test-functions b/test/test-functions index 2a733d8b8f4..1bf9f2d54f8 100644 --- a/test/test-functions +++ b/test/test-functions @@ -1256,6 +1256,11 @@ install_systemd() { # the systemd-nspawn@.service unit. cp "$initdir/usr/lib/systemd/system/systemd-nspawn@.service" "$initdir/etc/systemd/system/systemd-nspawn@.service" sed -ri "s/^ExecStart=.+$/& --bind=${BUILD_DIR//\//\\\/}/" "$initdir/etc/systemd/system/systemd-nspawn@.service" + # Pass the $BUILD_DIR as $COVERAGE_BUILD_DIR env variable to the system + # manager, similarly to what we do with $ASAN_RT_PATH during sanitized + # builds + mkdir -p "$initdir/etc/systemd/system.conf.d/" + echo -ne "[Manager]\nDefaultEnvironment=COVERAGE_BUILD_DIR=$BUILD_DIR\n" >"$initdir/etc/systemd/system.conf.d/99-COVERAGE_BUILD_DIR.conf" fi # If we're built with -Dportabled=false, tests with systemd-analyze