Skip to content
Newer
Older
100644 83 lines (62 sloc) 1.89 KB
00690e7 @lancejpollard better test setup
lancejpollard authored
1 SRC = $(shell find test/cases -name client -prune -o -name '*Test.coffee' -print)
8896d38 @lancejpollard Makefile for running tests on a per-database level
lancejpollard authored
2 STORES = memory mongodb
b0e670b @lancejpollard set default store
lancejpollard authored
3 CMD = ./node_modules/mocha/bin/mocha
4d9bcdc @lancejpollard ROADMAP and some makefile ideas
lancejpollard authored
4 DIR = $(shell pwd)
b30a495 @lancejpollard client tests on travis
lancejpollard authored
5 GRUNT = grunt
6 FOREVER = forever
8896d38 @lancejpollard Makefile for running tests on a per-database level
lancejpollard authored
7
b30a495 @lancejpollard client tests on travis
lancejpollard authored
8 # @todo make this into a method
9 #define checkmodule
10 #endef
11 #
12 #check-grunt:
13 # $(call checkmodule,grunt,./node_modules/grunt/bin/grunt)
14
15 check-grunt:
16 ifeq ($(shell which $(GRUNT)),)
17 $(eval GRUNT = ./node_modules/grunt/bin/grunt)
18 ifeq ($(shell which ./node_modules/grunt/bin/grunt),)
19 npm install grunt
20 endif
21 endif
22
23 check-forever:
24 ifeq ($(shell which $(FOREVER)),)
25 $(eval FOREVER = ./node_modules/forever/bin/forever)
26 ifeq ($(shell which ./node_modules/forever/bin/forever),)
27 npm install forever
28 endif
29 endif
30
31 # ps -ef | awk '/node server -p 3210/{print $2}' | wc -l | awk '{print $1}'
32 # check-server: check-forever
8896d38 @lancejpollard Makefile for running tests on a per-database level
lancejpollard authored
33
b30a495 @lancejpollard client tests on travis
lancejpollard authored
34 check-phantomjs:
4d9bcdc @lancejpollard ROADMAP and some makefile ideas
lancejpollard authored
35 ifeq ($(shell which phantomjs),) # if it's blank
36 $(error PhantomJS is not installed. Download from http://phantomjs.org or run `brew install phantomjs` if you have Homebrew)
37 endif
38
b30a495 @lancejpollard client tests on travis
lancejpollard authored
39 test: test-memory test-mongodb
8896d38 @lancejpollard Makefile for running tests on a per-database level
lancejpollard authored
40
b0e670b @lancejpollard set default store
lancejpollard authored
41 test-memory:
42 $(CMD) $(SRC) --store memory
43
44 test-mongodb:
45 $(CMD) $(SRC) --store mongodb
46
53cb29e @lancejpollard primitive phantomjs integration
lancejpollard authored
47 test-client:
804fc4e @lancejpollard client tests
lancejpollard authored
48 phantomjs test/client.coffee http://localhost:3210/?test=support,application,store,model
4d9bcdc @lancejpollard ROADMAP and some makefile ideas
lancejpollard authored
49
b30a495 @lancejpollard client tests on travis
lancejpollard authored
50 setup-test-client: check-phantomjs check-grunt
51 $(GRUNT) --config ./grunt.coffee
52 cd test/example && $(GRUNT) --config ./grunt.coffee
53
54 start-test-client:
55 cd test/example && node server -p 3210
56
57 test-all:
58 for i in $(STORES); do ./node_modules/mocha/bin/mocha $(SRC) --store $$i; done
59
0c9a855 @lancejpollard compiles to lib
lancejpollard authored
60 clean:
61 rm -rf lib/*
62
63 whitespace:
64 cake clean
65
66 install:
7a3b21e @lancejpollard fine-tuned installation
lancejpollard authored
67 npm install
68 npm install-dev
0c9a855 @lancejpollard compiles to lib
lancejpollard authored
69
70 watch:
b30a495 @lancejpollard client tests on travis
lancejpollard authored
71 $(GRUNT) start --config ./grunt.coffee
0c9a855 @lancejpollard compiles to lib
lancejpollard authored
72
73 build:
b30a495 @lancejpollard client tests on travis
lancejpollard authored
74 $(GRUNT) build:client --config ./grunt.coffee
cc8f4cc @lancejpollard grunt task to publish client tower.js to github
lancejpollard authored
75
76 dist:
b30a495 @lancejpollard client tests on travis
lancejpollard authored
77 $(GRUNT) dist --config ./grunt.coffee
0c9a855 @lancejpollard compiles to lib
lancejpollard authored
78
79 publish:
80 npm publish
81
b30a495 @lancejpollard client tests on travis
lancejpollard authored
82 .PHONY: test-memory test-mongodb test test-all test-client build dist check-phantomjs check-grunt check-forever setup-test-client start-test-client
Something went wrong with that request. Please try again.