|
@@ -21,6 +21,7 @@ echo $testname
|
|
|
|
|
|
failcount=0
|
|
|
tempfile=@abs_builddir@/init_logger_test_tempfile_$$
|
|
|
+destfile_tmp=@abs_builddir@/init_logger_test_destfile_tmp_$$
|
|
|
destfile=@abs_builddir@/init_logger_test_destfile_$$
|
|
|
|
|
|
passfail() {
|
|
@@ -45,6 +46,7 @@ ERROR [bind10.log] LOG_DUPLICATE_MESSAGE_ID duplicate message ID (error) in comp
|
|
|
FATAL [bind10.log] LOG_NO_MESSAGE_ID line fatal: message definition line found without a message ID
|
|
|
.
|
|
|
B10_LOGGER_DESTINATION=stdout B10_LOGGER_SEVERITY=DEBUG B10_LOGGER_DBGLEVEL=99 ./init_logger_test | \
|
|
|
+ sed -e 's/\[\([a-z0-9\.]\+\)\/\([0-9]\+\)\]/[\1]/' | \
|
|
|
cut -d' ' -f3- | diff $tempfile -
|
|
|
passfail $?
|
|
|
|
|
@@ -58,6 +60,7 @@ ERROR [bind10.log] LOG_DUPLICATE_MESSAGE_ID duplicate message ID (error) in comp
|
|
|
FATAL [bind10.log] LOG_NO_MESSAGE_ID line fatal: message definition line found without a message ID
|
|
|
.
|
|
|
B10_LOGGER_DESTINATION=stdout B10_LOGGER_SEVERITY=DEBUG B10_LOGGER_DBGLEVEL=50 ./init_logger_test | \
|
|
|
+ sed -e 's/\[\([a-z0-9\.]\+\)\/\([0-9]\+\)\]/[\1]/' | \
|
|
|
cut -d' ' -f3- | diff $tempfile -
|
|
|
passfail $?
|
|
|
|
|
@@ -68,6 +71,7 @@ ERROR [bind10.log] LOG_DUPLICATE_MESSAGE_ID duplicate message ID (error) in comp
|
|
|
FATAL [bind10.log] LOG_NO_MESSAGE_ID line fatal: message definition line found without a message ID
|
|
|
.
|
|
|
B10_LOGGER_DESTINATION=stdout B10_LOGGER_SEVERITY=WARN ./init_logger_test | \
|
|
|
+ sed -e 's/\[\([a-z0-9\.]\+\)\/\([0-9]\+\)\]/[\1]/' | \
|
|
|
cut -d' ' -f3- | diff $tempfile -
|
|
|
passfail $?
|
|
|
|
|
@@ -77,20 +81,23 @@ echo -n " - stdout: "
|
|
|
cat > $tempfile << .
|
|
|
FATAL [bind10.log] LOG_NO_MESSAGE_ID line fatal: message definition line found without a message ID
|
|
|
.
|
|
|
-rm -f $destfile
|
|
|
-B10_LOGGER_SEVERITY=FATAL B10_LOGGER_DESTINATION=stdout ./init_logger_test 1> $destfile
|
|
|
+rm -f $destfile_tmp $destfile
|
|
|
+B10_LOGGER_SEVERITY=FATAL B10_LOGGER_DESTINATION=stdout ./init_logger_test 1> $destfile_tmp
|
|
|
+sed -e 's/\[\([a-z0-9\.]\+\)\/\([0-9]\+\)\]/[\1]/' < $destfile_tmp > $destfile
|
|
|
cut -d' ' -f3- $destfile | diff $tempfile -
|
|
|
passfail $?
|
|
|
|
|
|
echo -n " - stderr: "
|
|
|
-rm -f $destfile
|
|
|
-B10_LOGGER_SEVERITY=FATAL B10_LOGGER_DESTINATION=stderr ./init_logger_test 2> $destfile
|
|
|
+rm -f $destfile_tmp $destfile
|
|
|
+B10_LOGGER_SEVERITY=FATAL B10_LOGGER_DESTINATION=stderr ./init_logger_test 2> $destfile_tmp
|
|
|
+sed -e 's/\[\([a-z0-9\.]\+\)\/\([0-9]\+\)\]/[\1]/' < $destfile_tmp > $destfile
|
|
|
cut -d' ' -f3- $destfile | diff $tempfile -
|
|
|
passfail $?
|
|
|
|
|
|
echo -n " - file: "
|
|
|
-rm -f $destfile
|
|
|
-B10_LOGGER_SEVERITY=FATAL B10_LOGGER_DESTINATION=$destfile ./init_logger_test
|
|
|
+rm -f $destfile_tmp $destfile
|
|
|
+B10_LOGGER_SEVERITY=FATAL B10_LOGGER_DESTINATION=$destfile_tmp ./init_logger_test
|
|
|
+sed -e 's/\[\([a-z0-9\.]\+\)\/\([0-9]\+\)\]/[\1]/' < $destfile_tmp > $destfile
|
|
|
cut -d' ' -f3- $destfile | diff $tempfile -
|
|
|
passfail $?
|
|
|
|
|
@@ -105,6 +112,6 @@ else
|
|
|
fi
|
|
|
|
|
|
# Tidy up.
|
|
|
-rm -f $tempfile $destfile
|
|
|
+rm -f $tempfile $destfile_tmp $destfile
|
|
|
|
|
|
exit $failcount
|