Merge pull request #2082 from jszakmeister/fixes-for-busted-and-luajit

tests: prevent busted from reloading the ffi module and others
This commit is contained in:
John Szakmeister
2015-03-09 05:47:48 -04:00
3 changed files with 13 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ endif()
execute_process(
COMMAND ${BUSTED_PRG} -v -o ${BUSTED_OUTPUT_TYPE}
--helper=${TEST_DIR}/${TEST_TYPE}/preload.lua
--lpath=${BUILD_DIR}/?.lua ${TEST_PATH}
WORKING_DIRECTORY ${WORKING_DIR}
ERROR_VARIABLE err

View File

@@ -0,0 +1,5 @@
-- Modules loaded here will not be cleared and reloaded by Busted.
-- Busted started doing this to help provide more isolation. See issue #62
-- for more information about this.
local ffi = require('ffi')
local helpers = require('test.functional.helpers')

7
test/unit/preload.lua Normal file
View File

@@ -0,0 +1,7 @@
-- Modules loaded here will not be cleared and reloaded by Busted.
-- Busted started doing this to help provide more isolation. See issue #62
-- for more information about this.
local ffi = require('ffi')
local helpers = require('test.unit.helpers')
local lfs = require('lfs')
local preprocess = require('test.unit.preprocess')