test: several cleanups for TEST-35-LOGIN

- use test_append_files() to install additional commands
- drop use of expect
- include assert.sh and use assertions at several places
- use timeout command at several places
- always use logind-test-user
- etc
This commit is contained in:
Yu Watanabe
2022-07-07 10:10:05 +09:00
committed by Frantisek Sumsal
parent 1f7eed4c35
commit 63663a0f0f
3 changed files with 194 additions and 232 deletions

View File

@@ -2,9 +2,13 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e
TEST_DESCRIPTION="LOGIN"
TEST_DESCRIPTION="Tests for systemd-logind"
# shellcheck source=test/test-functions
. "${TEST_BASE_DIR:?}/test-functions"
test_append_files() {
image_install -o evemu-device evemu-event crond crontab
}
do_test "$@"

View File

@@ -1735,16 +1735,6 @@ install_basic_tools() {
image_install -o sushell
# in Debian ldconfig is just a shell script wrapper around ldconfig.real
image_install -o ldconfig.real
# for TEST-35-LOGIN
image_install -o evemu-device evemu-event crond crontab
image_install -o evemu-device evemu-event
if command -v expect >/dev/null && command -v tclsh >/dev/null ; then
# shellcheck disable=SC2016
version="$(tclsh <<< 'puts $tcl_version')"
image_install expect
inst_recursive /usr/lib64/tcl"$version" /usr/share/tcl"$version"
fi
}
install_debug_tools() {

File diff suppressed because it is too large Load Diff