revert busted to v1.10.0 to avoid segmentation fault in testing

pull/1444/head
chrox 9 years ago
parent 31d4b4674f
commit 0191dc6530

@ -13,15 +13,19 @@ before_install:
- sudo apt-get update
install:
# nasm for building libpng
- sudo apt-get install libsdl1.2-dev luarocks nasm
- sudo luarocks install busted
# install an older version of lua_cliargs for busted v1.10.0
- sudo luarocks install lua_cliargs 2.1-2
# recent versions of busted may cause some weird segmentation faults
- git clone https://github.com/Olivine-Labs/busted/
- cd busted && git checkout v1.10.0 && sudo luarocks make && cd ..
- sudo luarocks install luacov
- sudo luarocks install luacov-coveralls --server=http://rocks.moonscript.org/dev
script:
- make fetchthirdparty all
- sudo cp base/build/*/luajit /usr/bin/
- sudo ln -sf /usr/bin/luajit /usr/bin/lua
- make testfront
after_success:

@ -93,14 +93,14 @@ $(INSTALL_DIR)/koreader/.luacov:
ln -sf ../../.luacov $(INSTALL_DIR)/koreader
testfront: $(INSTALL_DIR)/koreader/.busted
cd $(INSTALL_DIR)/koreader && busted
cd $(INSTALL_DIR)/koreader && busted -l ./luajit
test:
$(MAKE) -C $(KOR_BASE) test
$(MAKE) testfront
coverage: $(INSTALL_DIR)/koreader/.luacov
cd $(INSTALL_DIR)/koreader && busted -c --exclude-tags=nocov
cd $(INSTALL_DIR)/koreader && busted -c -l ./luajit --exclude-tags=nocov
# coverage report summary
cd $(INSTALL_DIR)/koreader && tail -n \
+$$(($$(grep -nm1 Summary luacov.report.out|cut -d: -f1)-1)) \

@ -1 +1 @@
Subproject commit 7025830053c47496db413802375236300eaf4e6e
Subproject commit 897906d91a3cbba0eb2aa27583a6510c99ac720d

@ -36,6 +36,7 @@ function HTTPClient:request(request, response_callback, error_callback)
UIManager.INPUT_TIMEOUT = self.INPUT_TIMEOUT
self.input_timeouts = self.input_timeouts + 1
local turbo = require("turbo")
turbo.log.categories.success = false
local res = coroutine.yield(
turbo.async.HTTPClient():fetch(request.url, request))
-- reset INPUT_TIMEOUT to nil when all HTTP requests are fullfilled.

@ -21,25 +21,3 @@ Input.dummy = true
-- turn on debug
local DEBUG = require("dbg")
--DEBUG:turnOn()
-- remove debug hooks in wrapped function for better luacov performance
if LUACOV then
local function hook_free_call(callback)
local hook, mask, count = debug.gethook()
debug.sethook()
local res = callback()
debug.sethook(hook, mask)
return res
end
local UIManager = require("ui/uimanager")
local uimanager_run = UIManager.run
function UIManager:run()
hook_free_call(function() return uimanager_run(UIManager) end)
end
local screen_shot = Screen.shot
function Screen:shot(filename)
hook_free_call(function() return screen_shot(Screen, filename) end)
end
end

@ -22,8 +22,6 @@ describe("HTTP client module", function()
local urls = {
"http://www.example.com",
"http://www.example.org",
"https://www.example.com",
"https://www.example.org",
}
requests = #urls
for _, url in ipairs(urls) do

Loading…
Cancel
Save