mirror of
https://github.com/koreader/koreader.git
synced 2025-12-18 12:02:09 +01:00
fix unit test with latest busted
This commit is contained in:
@@ -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:
|
||||
|
||||
4
Makefile
4
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 -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)) \
|
||||
|
||||
2
base
2
base
Submodule base updated: 8d31203c7f...7025830053
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user