-runtest()
-{
- testoutput=$(${MH_LIB_DIR}/ap -format "%(myhost)" ignore)
-
- if [ x"$1" != x"${testoutput}" ]; then
- echo "For $2, expected $1 but got ${testoutput}"
- exit 1
- fi
-}
-
-runtest "$(hostname)" "local hostname test"
+start_test 'local hostname test'
+set +e
+host=`${MH_OBJ_DIR}/test/getcanon`
+set -e
+myhost=`${MH_LIBEXEC_DIR}/ap -format '%(myhost)' ignore 2>&1`
+if [ "$myhost" != "$host" ]; then
+ echo "$0: myhost reports $myhost but canonical hostname is $host"
+fi