The logs from TEST-69 still contain a lot of unnecessary shell
metacharacters, so to make the output more readable let's just set
TERM=dumb, instead of having to strip everything semi-manually. Also,
move the related --background= tweak to TEST-69, since it's relevant
only for that particular test.
Follow-up for
8d4bfd38ed941aa8003d7007145eccc01f52a5f6.
setup_nspawn_root_hook() {
cat >"${STATEDIR:?}/run-nspawn" <<EOF
#!/bin/bash
-exec "${TEST_BASE_DIR:?}/test-shutdown.py" -v -- "$_ORIG_NSPAWN" "\$@"
+exec "${TEST_BASE_DIR:?}/test-shutdown.py" -v -- "$_ORIG_NSPAWN" --background= "\$@"
exit 1
EOF
chmod 755 "${STATEDIR:?}"/run-nspawn
"--directory=${1:?}"
"--setenv=SYSTEMD_UNIT_PATH=/usr/lib/systemd/tests/testdata/testsuite-$2.units:/usr/lib/systemd/tests/testdata/units:"
"--machine=TEST-$TESTID"
- "--background=''"
)
local kernel_params=(
"$PATH_TO_INIT"
def run(args):
-
ret = 1
logger = logging.getLogger("test-shutdown")
logfile = None
logger.info("spawning test")
console = pexpect.spawn(args.command, args.arg, logfile=logfile, env={
- "TERM": "linux",
+ "TERM": "dumb",
}, encoding='utf-8', timeout=60)
logger.debug("child pid %d", console.pid)