forked from mozilla-b2g/marionette-js-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
82 lines (69 loc) · 1.87 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
REPORTER=spec
# doc variables
YUIDOCJS?=./node_modules/yuidocjs/lib/cli.js
DOC_PARAMS?=--themedir ./docs/theme
DOC_DIR=./lib/marionette
DOC_REMOTE?=upstream
default: node_modules b2g
b2g:
./node_modules/.bin/mozilla-download \
--product b2g-desktop \
--branch mozilla-central \
$(shell pwd)
node_modules: package.json
npm install
.PHONY: link
link:
npm link
npm link marionette-client
.PHONY: clean
clean:
rm -rf b2g/ node_modules/
npm unlink marionette-client
.PHONY: test-server
test-server: node_modules
./node_modules/.bin/js-test-agent server --growl
.PHONY: doc-server
doc-server: node_modules
$(YUIDOCJS) $(DOC_PARAMS) --server $(DOC_DIR)
.PHONY: doc-publish
doc-publish: node_modules
git fetch $(DOC_REMOTE)
git checkout --detach
git branch -D gh-pages || true
git branch gh-pages
git checkout -
git checkout gh-pages
$(YUIDOCJS) $(DOC_PARAMS) -o ./api-docs-temp/ $(DOC_DIR) -c ./yuidoc.json
rm -Rf api-docs
mv api-docs-temp api-docs
git add -f api-docs
git commit -m "regenerate api docs"
git push -f $(DOC_REMOTE) gh-pages
git checkout -
rm -Rf api-docs-temp/
.PHONY: test
test: test-unit test-integration
.PHONY: test-integration
test-integration: default link
./node_modules/.bin/marionette-mocha \
--profile-base $(shell pwd)/profile.js \
$(shell find test/integration -name "*-test.js")
.PHONY: test-unit
test-unit: default
./node_modules/mocha/bin/mocha \
./test/node/*-test.js \
./test/marionette/index-test.js \
./test/marionette/command-stream-test.js \
./test/marionette/client-test.js \
./test/marionette/error-test.js \
./test/marionette/element-test.js \
./test/marionette/actions-test.js \
./test/marionette/multi-actions-test.js \
./test/marionette/drivers/abstract-test.js \
./test/marionette/drivers/tcp-test.js \
./test/marionette/drivers/tcp-sync-test.js
.PHONY: ci
ci:
Xvfb :99 &
DISPLAY=:99 make test