2016-01-22 19:22:54 +08:00
|
|
|
SHELL=/bin/bash
|
|
|
|
|
2012-07-13 00:08:21 +08:00
|
|
|
all:
|
|
|
|
npm install
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf node_modules/*
|
|
|
|
|
|
|
|
check:
|
|
|
|
npm test
|
2015-05-13 00:33:57 +08:00
|
|
|
|
2015-05-13 19:01:01 +08:00
|
|
|
jshint:
|
|
|
|
@echo "***jshint***"
|
2016-01-22 19:29:12 +08:00
|
|
|
@./node_modules/.bin/jshint app/ batch/ test/ app.js
|
2015-05-13 19:01:01 +08:00
|
|
|
|
2016-07-18 20:49:57 +08:00
|
|
|
TEST_SUITE := $(shell find test/{acceptance,unit,integration} -name "*.js")
|
2016-01-22 19:03:24 +08:00
|
|
|
TEST_SUITE_UNIT := $(shell find test/unit -name "*.js")
|
2016-07-18 20:49:57 +08:00
|
|
|
TEST_SUITE_INTEGRATION := $(shell find test/integration -name "*.js")
|
2016-01-22 19:03:24 +08:00
|
|
|
TEST_SUITE_ACCEPTANCE := $(shell find test/acceptance -name "*.js")
|
2016-10-06 17:53:56 +08:00
|
|
|
TEST_SUITE_BATCH := $(shell find test/*/batch -name "*.js")
|
2016-01-22 19:03:24 +08:00
|
|
|
|
2015-05-13 00:33:57 +08:00
|
|
|
test:
|
2015-05-13 19:13:16 +08:00
|
|
|
@echo "***tests***"
|
2016-01-22 19:22:54 +08:00
|
|
|
@$(SHELL) test/run_tests.sh ${RUNTESTFLAGS} $(TEST_SUITE)
|
2015-05-13 00:33:57 +08:00
|
|
|
|
|
|
|
test-unit:
|
2015-05-13 19:13:16 +08:00
|
|
|
@echo "***unit tests***"
|
2016-01-22 19:22:54 +08:00
|
|
|
@$(SHELL) test/run_tests.sh ${RUNTESTFLAGS} $(TEST_SUITE_UNIT)
|
2015-05-13 00:33:57 +08:00
|
|
|
|
2016-07-18 20:49:57 +08:00
|
|
|
test-integration:
|
|
|
|
@echo "***integration tests***"
|
|
|
|
@$(SHELL) test/run_tests.sh ${RUNTESTFLAGS} $(TEST_SUITE_INTEGRATION)
|
|
|
|
|
2015-05-13 00:33:57 +08:00
|
|
|
test-acceptance:
|
2015-05-13 19:13:16 +08:00
|
|
|
@echo "***acceptance tests***"
|
2016-01-22 19:22:54 +08:00
|
|
|
@$(SHELL) test/run_tests.sh ${RUNTESTFLAGS} $(TEST_SUITE_ACCEPTANCE)
|
2015-05-13 00:33:57 +08:00
|
|
|
|
2016-08-31 00:42:50 +08:00
|
|
|
test-batch:
|
|
|
|
@echo "***batch queries tests***"
|
|
|
|
@$(SHELL) test/run_tests.sh ${RUNTESTFLAGS} $(TEST_SUITE_BATCH)
|
|
|
|
|
2015-05-13 19:13:16 +08:00
|
|
|
test-all: jshint test
|
|
|
|
|
2016-01-22 19:18:20 +08:00
|
|
|
coverage:
|
|
|
|
@RUNTESTFLAGS=--with-coverage make test
|
|
|
|
|
|
|
|
.PHONY: test coverage
|