mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 02:03:37 +08:00
test: make the output of TEST-69 less painful to read
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 8d4bfd38ed
.
This commit is contained in:
parent
fc4a9c9ce6
commit
8d9cdb31f7
@ -17,7 +17,7 @@ SYSTEMD_NSPAWN="${STATEDIR:?}/run-nspawn"
|
||||
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
|
||||
|
@ -662,7 +662,6 @@ 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"
|
||||
|
@ -12,7 +12,6 @@ import pexpect
|
||||
|
||||
|
||||
def run(args):
|
||||
|
||||
ret = 1
|
||||
logger = logging.getLogger("test-shutdown")
|
||||
logfile = None
|
||||
@ -25,7 +24,7 @@ def run(args):
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user