2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-01 06:45:38 +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 then
echo "SIGNAL$(($rc - 128))" > $outfile echo "SIGNAL$(($rc - 128))" > $outfile
fi fi
checktestfg checktestfg "$@"
} }
runtestfg() runtestfg()
@@ -207,6 +207,15 @@ checktestfg()
;; ;;
esac esac
if [ $# -gt 0 ]
then
$1
if [ "$teststatus" != "pass" ]
then
return
fi
fi
if [ -n "$VERBOSE" ]; then if [ -n "$VERBOSE" ]; then
echo "ok: ${_testdesc}" echo "ok: ${_testdesc}"
fi fi