forked from Kong/kong
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (38 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
DEV_ROCKS = busted luacheck lua-llthreads2
BUSTED_ARGS ?= -v
TEST_CMD ?= bin/busted $(BUSTED_ARGS)
OPENSSL_DIR ?= /usr/local/opt/openssl
.PHONY: install dev lint test test-integration test-plugins test-all
install:
@luarocks make OPENSSL_DIR=$(OPENSSL_DIR)
dev: install
@for rock in $(DEV_ROCKS) ; do \
if ! luarocks list | grep $$rock > /dev/null ; then \
echo $$rock not found, installing via luarocks... ; \
luarocks install $$rock ; \
else \
echo $$rock already installed, skipping ; \
fi \
done;
lint:
@luacheck -q . \
--exclude-files 'kong/vendor/**/*.lua' \
--exclude-files 'spec/fixtures/invalid-module.lua' \
--std 'ngx_lua+busted' \
--globals '_KONG' \
--globals 'ngx' \
--globals 'assert' \
--globals 'string.pack' \
--globals 'string.unpack' \
--globals 'bit.mod' \
--no-redefined \
--no-unused-args \
--ignore 6..
test:
@$(TEST_CMD) spec/01-unit
test-integration:
@$(TEST_CMD) spec/02-integration
test-plugins:
@$(TEST_CMD) spec/03-plugins
test-all:
@$(TEST_CMD) spec/