Assert no defunct process is generated as a postcondition of all tests.

This commit is contained in:
Marc CARRE committed 2017-03-17 10:36:16 +00:00
1 parent 31b7e063e7
commit 7b1e8ac1cf
1 file changed
+9
+9
View File
@@ -278,7 +278,16 @@ start_suite() {
whitely echo "$@"
}
# Common postconditions to assert on each host, after each test:
assert_common_postconditions() {
# Ensure we do not generate any defunct (a.k.a. zombie) process:
assert "run_on $1 ps aux | grep -c '[d]efunct'" "0"
}
end_suite() {
for host in $HOSTS; do
assert_common_postconditions "$host"
done
whitely assert_end
for host in $HOSTS; do
stop_weave_on $host