-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (29 loc) · 1.16 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
all: doc test
test: ./vendor/bin/phpunit
./vendor/bin/phpunit -c phpunit.xml --testdox
test-coverage: ./vendor/bin/phpunit test/output/
./vendor/bin/phpunit -c phpunit.xml --testdox \
--coverage-html test/output/coverage \
--coverage-php test/output/coverage/coverage.php \
--coverage-clover test/output/coverage/coverage.xml \
; ret=$$?; \
find test/output/coverage/ -type f -name '*.html' -print0 \
| xargs -0 sed -i 's!$(PWD)!libsmalldb: !g'; \
cp "test/output/coverage/_js/file.js" "test/output/coverage/_js/file.js~"; \
sed -i "test/output/coverage/_js/file.js" \
-e "s/^\\s*\$$('\\.popin')/ \$$('.popin td[data-content]')/" \
-e "s/\$$\\((this)\\|target\\)\\.children()\\.first()/\$$\\1/g"; \
exit $$ret
benchmark: ./vendor/bin/phpunit
./vendor/bin/phpunit -c phpunit.xml --testdox --testsuite benchmark
./vendor/bin/phpunit:
composer install --dev
test/output/:
mkdir test/output
test/output/coverage/coverage.php:
make test-coverage
test/output/covered-files.list: ./test/covered-files.php test/output/coverage/coverage.php
./test/covered-files.php > test/output/covered-files.list
doc:
make -C doc/
.PHONY: all test test-coverage doc benchmark