forked from mozilla-b2g/marionette-js-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (55 loc) · 1.59 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
REPORTER=spec
# doc variables
YUIDOCJS?=./node_modules/yuidocjs/lib/cli.js
DOC_PARAMS?=--themedir ./docs/theme
DOC_DIR=./lib/marionette
.PHONY: link
link:
npm link
npm link marionette-client
.PHONY: test-server
test-server:
./node_modules/test-agent/bin/js-test-agent server --growl
.PHONY: doc-server
doc-server:
$(YUIDOCJS) $(DOC_PARAMS) --server $(DOC_DIR)
.PHONY: doc-publish
doc-publish:
$(YUIDOCJS) $(DOC_PARAMS) -o ./api-docs-temp/ $(DOC_DIR) -c ./yuidoc.json
git checkout gh-pages
rm -Rf api-docs
mv api-docs-temp api-docs
git add -f api-docs
git commit -m "regenerate api docs"
git push origin gh-pages --force
git checkout master
rm -Rf api-docs-temp/
.PHONY: test
test : test-unit test-integration
b2g:
./node_modules/.bin/mozilla-download --product b2g --verbose $@
.PHONY: test-integration
test-integration: link b2g
./node_modules/.bin/marionette-mocha --reporter $(REPORTER) \
--profile-base $(PWD)/profile.js \
--ui tdd \
--timeout 30s \
$(shell find test/integration -name "*-test.js")
.PHONY: test-node
test-unit:
./node_modules/mocha/bin/mocha --reporter $(REPORTER) \
./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 -t 5s
.PHONY: ci
ci:
Xvfb :99 &
DISPLAY=:99 make test