fix unit test with latest busted

pull/1442/head
chrox 9 years ago
parent e74d1fa557
commit 4053b5adac

@ -14,14 +14,13 @@ before_install:
install:
- sudo apt-get install libsdl1.2-dev luarocks nasm
- 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 busted 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 -l ./luajit
cd $(INSTALL_DIR)/koreader && busted
test:
$(MAKE) -C $(KOR_BASE) test
$(MAKE) testfront
coverage: $(INSTALL_DIR)/koreader/.luacov
cd $(INSTALL_DIR)/koreader && busted -c -l ./luajit --exclude-tags=nocov
cd $(INSTALL_DIR)/koreader && busted -c --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 8d31203c7f3667ba75744ec50c8201f01ebc5286
Subproject commit 7025830053c47496db413802375236300eaf4e6e

@ -3,6 +3,7 @@ local DocumentRegistry = require("document/documentregistry")
describe("PDF document module", function()
local sample_pdf = "spec/front/unit/data/tall.pdf"
local doc
it("should open document", function()
doc = DocumentRegistry:openDocument(sample_pdf)
assert.truthy(doc)
@ -38,6 +39,7 @@ end)
describe("EPUB document module", function()
local sample_epub = "spec/front/unit/data/leaves.epub"
local doc
it("should open document", function()
doc = DocumentRegistry:openDocument(sample_epub)
assert.truthy(doc)

Loading…
Cancel
Save