aboutsummaryrefslogtreecommitdiff
path: root/test/unit/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/helpers.lua')
-rw-r--r--test/unit/helpers.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua
index 9d200a8721..b6fcc959ef 100644
--- a/test/unit/helpers.lua
+++ b/test/unit/helpers.lua
@@ -10,6 +10,8 @@ local say = require('say')
local posix = nil
local syscall = nil
+local check_cores = global_helpers.check_cores
+local which = global_helpers.which
local neq = global_helpers.neq
local eq = global_helpers.eq
local ok = global_helpers.ok
@@ -431,7 +433,7 @@ local function gen_itp(it)
return itp
end
-return {
+local module = {
cimport = cimport,
cppimport = cppimport,
internalize = internalize,
@@ -448,3 +450,11 @@ return {
alloc_log_new = alloc_log_new,
gen_itp = gen_itp,
}
+return function(after_each)
+ if after_each then
+ after_each(function()
+ check_cores(which('luajit'))
+ end)
+ end
+ return module
+end