unittests: Check core dumps in after_each, like in functests

This commit is contained in:
ZyX
2017-03-11 13:28:18 +03:00
parent 12b062b2c8
commit 9400466282
25 changed files with 43 additions and 24 deletions

View File

@@ -212,6 +212,14 @@ local function check_cores(app)
end
end
local function which(exe)
local pipe = io.popen('which ' .. exe, 'r')
local ret = pipe:read('*a')
pipe:close()
assert(ret:sub(-1) == '\n')
return ret:sub(1, -2)
end
return {
eq = eq,
neq = neq,
@@ -224,4 +232,5 @@ return {
glob = glob,
check_cores = check_cores,
hasenv = hasenv,
which = which,
}