test: use new logger() function in all tests

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2022-05-21 15:43:12 +02:00
parent 7e1d7bcb06
commit 577d20b8da
6 changed files with 25 additions and 19 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/sh
# shellcheck disable=SC1090
set -x
if [ x"${srcdir}" = x ]; then
@@ -6,8 +7,6 @@ if [ x"${srcdir}" = x ]; then
fi
. ${srcdir}/lib.sh
[ -x ../src/logger ] || SKIP 'logger missing'
NOT1=${DIR}/${NM}-1.sh
NOT1STAMP=${DIR}/${NM}-1.stamp
NOT2=${DIR}/${NM}-2.sh
@@ -28,13 +27,13 @@ setup
MSG=01234567890123456789012345678901234567890123456789
MSG=$MSG$MSG$MSG$MSG$MSG$MSG$MSG$MSG$MSG$MSG
../src/logger -u ${SOCK} ${MSG}
../src/logger -u ${SOCK} 1${MSG}
../src/logger -u ${SOCK} 2${MSG}
logger ${MSG}
logger 1${MSG}
logger 2${MSG}
if [ -f ${LOG}.0 ] &&
grep 'script 1' ${NOT1STAMP} &&
grep 'script 2' ${NOT2STAMP}; then
if [ -f "${LOG}.0" ] &&
grep 'script 1' "${NOT1STAMP}" &&
grep 'script 2' "${NOT2STAMP}"; then
OK
else
FAIL 'Notifier did not run.'