Unify teardown function

This commit is contained in:
emanuele-f 2019-10-10 17:24:24 +02:00
parent 2da2bdf7f6
commit 75cf795521
5 changed files with 19 additions and 30 deletions

View file

@ -493,4 +493,19 @@ end
-- ##############################################
-- @brief Teardown function, to be called at the end of the VM
function user_scripts.teardown(available_modules, do_benchmark, do_print_benchmark)
for _, check in pairs(available_modules.modules) do
if check.teardown then
check.teardown()
end
end
if do_benchmark then
user_scripts.benchmark_dump(do_print_benchmark)
end
end
-- ##############################################
return(user_scripts)