fix: Use current repository ldoc for tests, not system installed one
This commit is contained in:
parent
59b728ca20
commit
874d845ee9
6
Makefile
6
Makefile
|
@ -3,6 +3,8 @@ LUA_BINDIR= $(shell echo `dirname $(LUA)`)
|
|||
LUA_PREFIX= $(shell echo `dirname $(LUA_BINDIR)`)
|
||||
LUA_SHAREDIR=$(LUA_PREFIX)/share/lua/5.1
|
||||
|
||||
_REPODIR != cd "$(shell dirname $(firstword $(MAKEFILE_LIST)))/" && pwd
|
||||
|
||||
ldoc:
|
||||
|
||||
install: install_parts
|
||||
|
@ -28,7 +30,7 @@ uninstall:
|
|||
|
||||
test: test-basic test-example test-md test-tables
|
||||
|
||||
RUN=&& ldoc . && diff -r docs cdocs && echo ok
|
||||
RUN=&& lua $(_REPODIR)/ldoc.lua . && diff -r docs cdocs && echo ok
|
||||
|
||||
test-prep:
|
||||
find -type d -name doc -execdir rsync -av --del {}/ cdocs/ \;
|
||||
|
@ -47,7 +49,7 @@ test-tables:
|
|||
|
||||
test-clean: clean-basic clean-example clean-md clean-tables
|
||||
|
||||
CLEAN=&& ldoc . && rd /S /Q cdocs && cp -rf docs cdocs
|
||||
CLEAN=&& lua $(_REPODIR)/ldoc.lua . && rd /S /Q cdocs && cp -rf docs cdocs
|
||||
|
||||
clean-basic:
|
||||
cd tests $(CLEAN)
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
local PWD = os.getenv("PWD")
|
||||
|
||||
local run
|
||||
if not arg[1] then
|
||||
run = function (dir)
|
||||
local cmd = 'cd '..dir..' && ldoc --testing . && diff -r doc cdocs'
|
||||
local cmd = 'cd '..dir..' && lua '..PWD..'/ldoc.lua --testing . && diff -r doc cdocs'
|
||||
print(cmd)
|
||||
os.execute(cmd)
|
||||
end
|
||||
elseif arg[1] == 'update' then
|
||||
run = function (dir)
|
||||
local cmd = 'cd '..dir..' && ldoc --dir cdocs --testing .'
|
||||
local cmd = 'cd '..dir..' && lua '..PWD..'/ldoc.lua --dir cdocs --testing .'
|
||||
print(cmd)
|
||||
os.execute(cmd)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue