Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 89 lines (68 sloc) 2.131 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)),)
7fad24c @lancejpollard absolute path to grunt in makefile
lancejpollard authored
17 $(eval GRUNT = $(shell pwd)/node_modules/grunt/bin/grunt)
b30a495 @lancejpollard client tests on travis
lancejpollard authored
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)),)
7fad24c @lancejpollard absolute path to grunt in makefile
lancejpollard authored
25 $(eval FOREVER = $(shell pwd)/node_modules/forever/bin/forever)
b30a495 @lancejpollard client tests on travis
lancejpollard authored
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
ba11a85 @lancejpollard makefile
lancejpollard authored
51 # tmp way of downloading vendor files
52 rm -rf test/example/vendor
1fe9beb @lancejpollard ignore vendor files
lancejpollard authored
53 ./bin/tower new example
54 mv example/vendor test/example
55 rm -rf ./example
b30a495 @lancejpollard client tests on travis
lancejpollard authored
56 $(GRUNT) --config ./grunt.coffee
7bf9dd2 @lancejpollard test client app node_modules for travis
lancejpollard authored
57 cd test/example && pwd && npm install .
f52b90d @lancejpollard relative grunt
lancejpollard authored
58 $(GRUNT) --config ./test/example/grunt.coffee
b30a495 @lancejpollard client tests on travis
lancejpollard authored
59
60 start-test-client:
61 cd test/example && node server -p 3210
62
63 test-all:
64 for i in $(STORES); do ./node_modules/mocha/bin/mocha $(SRC) --store $$i; done
65
0c9a855 @lancejpollard compiles to lib
lancejpollard authored
66 clean:
67 rm -rf lib/*
68
69 whitespace:
70 cake clean
71
72 install:
7a3b21e @lancejpollard fine-tuned installation
lancejpollard authored
73 npm install
74 npm install-dev
0c9a855 @lancejpollard compiles to lib
lancejpollard authored
75
76 watch:
b30a495 @lancejpollard client tests on travis
lancejpollard authored
77 $(GRUNT) start --config ./grunt.coffee
0c9a855 @lancejpollard compiles to lib
lancejpollard authored
78
79 build:
b30a495 @lancejpollard client tests on travis
lancejpollard authored
80 $(GRUNT) build:client --config ./grunt.coffee
cc8f4cc @lancejpollard grunt task to publish client tower.js to github
lancejpollard authored
81
82 dist:
b30a495 @lancejpollard client tests on travis
lancejpollard authored
83 $(GRUNT) dist --config ./grunt.coffee
0c9a855 @lancejpollard compiles to lib
lancejpollard authored
84
85 publish:
86 npm publish
87
b30a495 @lancejpollard client tests on travis
lancejpollard authored
88 .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.