2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

tests: Add an optional final check to checktestfg and checktestbg

Allows for the test script to specify a final check to be performed
after checking the output of the test binary. This may be useful, for
example, if the test script wants to compare logging output of the test
binary to known-good logging output.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Tyler Hicks
2013-08-02 16:19:54 -07:00
parent 553d0d9eaf
commit 2fbea1ceea

View File

@@ -129,7 +129,7 @@ checktestbg()
then
echo "SIGNAL$(($rc - 128))" > $outfile
fi
checktestfg
checktestfg "$@"
}
runtestfg()
@@ -207,6 +207,15 @@ checktestfg()
;;
esac
if [ $# -gt 0 ]
then
$1
if [ "$teststatus" != "pass" ]
then
return
fi
fi
if [ -n "$VERBOSE" ]; then
echo "ok: ${_testdesc}"
fi