-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
36 lines (27 loc) · 980 Bytes
/
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
REPORTER=spec
COV_OUTPUT=coverage.html
COV_NODE_VER=v0.10.
NO_JSHINT_VER=v0.8.
JSHINT_ARGS=index.js lib test
style:
node --version | grep -Fq '$(NO_JSHINT_VER)' && true || jshint $(JSHINT_ARGS)
test:
node --version | grep -Fq '$(COV_NODE_VER)' && ! test -z $(TRAVIS_JOB_ID) && $(MAKE) test-no-coveralls test-coveralls || $(MAKE) test-no-coveralls
lib-cov:
@./node_modules/jscoverage/bin/jscoverage lib lib-cov
test-cov: lib-cov
@JMX_COVERAGE=1 $(MAKE) mocha REPORTER=html-cov > $(COV_OUTPUT)
rm -rf lib-cov
@echo "Coverate Output File: $(COV_OUTPUT)"
test-coveralls: lib-cov
@echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
@JMX_COVERAGE=1 $(MAKE) mocha REPORTER=mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
rm -rf lib-cov
test-no-coveralls:
@JMX_COVERAGE= $(MAKE) mocha
mocha:
@NODE_ENV=test ./node_modules/.bin/mocha -b --recursive --reporter $(REPORTER)
test-java-classes:
javac -version 2>&1 | grep -F 'javac 1.7'
javac test/*/*.java
.PHONY: test