diff --git a/.travis.yml b/.travis.yml index 837e79b58..e661d7b3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/Makefile b/Makefile index 8ad990ab8..55f7f669b 100644 --- a/Makefile +++ b/Makefile @@ -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)) \ diff --git a/base b/base index 702583005..897906d91 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 7025830053c47496db413802375236300eaf4e6e +Subproject commit 897906d91a3cbba0eb2aa27583a6510c99ac720d diff --git a/frontend/httpclient.lua b/frontend/httpclient.lua index 66043442a..d3e02df33 100644 --- a/frontend/httpclient.lua +++ b/frontend/httpclient.lua @@ -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. diff --git a/spec/unit/commonrequire.lua b/spec/unit/commonrequire.lua index 67c8ef4a4..e9aedbf65 100644 --- a/spec/unit/commonrequire.lua +++ b/spec/unit/commonrequire.lua @@ -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 diff --git a/spec/unit/httpclient_spec.lua b/spec/unit/httpclient_spec.lua index bffb1091c..b1c3e8762 100644 --- a/spec/unit/httpclient_spec.lua +++ b/spec/unit/httpclient_spec.lua @@ -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