forked from pkgcloud/pkgcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (27 loc) · 751 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
MOCHA_OPTS=-t 4000 test/*/*/*-test.js test/*/*/*/*-test.js
REPORTER = spec
check: test
test: test-unit
test-unit:
@NODE_ENV=test MOCK=on ./node_modules/.bin/mocha \
--reporter $(REPORTER) \
$(MOCHA_OPTS)
lib-cov:
jscoverage --encoding=UTF-8 lib lib-cov
test-cov: lib-cov
mv lib lib-bak
mv lib-cov lib
$(MAKE) test REPORTER=html-cov > coverage.html
rm -rf lib
mv lib-bak lib
test-coveralls: lib-cov
echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
mv lib lib-bak
mv lib-cov lib
$(MAKE) test REPORTER=mocha-lcov-reporter > pkgcloud.lcov.raw
rm -rf lib
mv lib-bak lib
sed "s#SF:#SF:$(PWD)/lib/#g" pkgcloud.lcov.raw > pkgcloud.lcov
./node_modules/coveralls/bin/coveralls.js < pkgcloud.lcov
rm pkgcloud.lcov pkgcloud.lcov.raw
.PHONY: test