2010-12-15 08:50:18 +08:00
|
|
|
SHELL := /bin/bash
|
|
|
|
|
|
|
|
user=postgres
|
|
|
|
password=1234
|
|
|
|
host=localhost
|
|
|
|
port=5432
|
|
|
|
database=postgres
|
2010-12-20 04:46:43 +08:00
|
|
|
verbose=false
|
2010-12-15 08:50:18 +08:00
|
|
|
|
2010-12-20 05:12:51 +08:00
|
|
|
test-connection:
|
|
|
|
@node script/test-connection.js -u $(user) --password $(password) -p $(port) -d $(database) -h $(host) --verbose $(verbose)
|
|
|
|
|
2010-12-15 08:50:18 +08:00
|
|
|
test-unit:
|
2010-12-20 04:46:43 +08:00
|
|
|
@find test/unit -name "*-tests.js" | xargs -n 1 -I file node file --verbose $(verbose)
|
2010-12-15 08:50:18 +08:00
|
|
|
|
2010-12-20 05:12:51 +08:00
|
|
|
test-integration: test-connection
|
2010-12-20 04:46:43 +08:00
|
|
|
@find test/integration -name "*-tests.js" | xargs -n 1 -I file node file -u $(user) --password $(password) -p $(port) -d $(database) -h $(host) --verbose $(verbose)
|
2010-12-15 08:50:18 +08:00
|
|
|
|
|
|
|
test-all: test-unit test-integration
|
|
|
|
test: test-unit
|
|
|
|
|
|
|
|
.PHONY : test
|