mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 12:51:52 +00:00
(Commandfile) add code coverage reporting
This commit is contained in:
parent
5073111829
commit
5ca50f5253
2
.gitignore
vendored
2
.gitignore
vendored
@ -40,3 +40,5 @@ tests/*.mem
|
|||||||
|
|
||||||
.vagrant
|
.vagrant
|
||||||
tmp-php.ini
|
tmp-php.ini
|
||||||
|
|
||||||
|
coverage_report/**
|
||||||
|
20
Commandfile
20
Commandfile
@ -20,7 +20,7 @@ command 'configure',
|
|||||||
command 'clean',
|
command 'clean',
|
||||||
description: 'executes "make clean"',
|
description: 'executes "make clean"',
|
||||||
script: <<-eof
|
script: <<-eof
|
||||||
cd /data/build; `which gmake || which make` clean
|
cd /data/build; `which gmake || which make` clean; rm -rf /data/v8js/coverage_report /data/build/gcov.info
|
||||||
eof
|
eof
|
||||||
|
|
||||||
command 'build',
|
command 'build',
|
||||||
@ -49,3 +49,21 @@ chain 'all',
|
|||||||
{ command: 'build' },
|
{ command: 'build' },
|
||||||
{ command: 'test' }
|
{ command: 'test' }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
command 'coverage_report',
|
||||||
|
description: 'capture *.gcda files and generate code coverage report',
|
||||||
|
script: <<-eof
|
||||||
|
cd /data/build
|
||||||
|
lcov --base-directory=.libs --directory=.libs --directory ../v8js/ --no-external --capture --output-file gcov.info
|
||||||
|
genhtml --legend --output-directory ../v8js/coverage_report/ --title "V8Js Code Coverage" gcov.info
|
||||||
|
eof
|
||||||
|
|
||||||
|
chain 'coverage',
|
||||||
|
commands: [
|
||||||
|
{ command: 'phpize' },
|
||||||
|
{ command: 'configure', argv: ['--cxxflags=-O0 --coverage', '--ldflags=--coverage'] },
|
||||||
|
{ command: 'clean' },
|
||||||
|
{ command: 'build' },
|
||||||
|
{ command: 'test' },
|
||||||
|
{ command: 'coverage_report' },
|
||||||
|
]
|
||||||
|
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -27,7 +27,7 @@ Vagrant.configure("2") do |config|
|
|||||||
gpg --armor --export 7F438280EF8D349F | apt-key add -
|
gpg --armor --export 7F438280EF8D349F | apt-key add -
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y software-properties-common gdb tmux git tig curl apache2-utils
|
apt-get install -y software-properties-common gdb tmux git tig curl apache2-utils lcov
|
||||||
|
|
||||||
add-apt-repository ppa:ondrej/php
|
add-apt-repository ppa:ondrej/php
|
||||||
add-apt-repository ppa:pinepain/libv8-#{version}
|
add-apt-repository ppa:pinepain/libv8-#{version}
|
||||||
|
Loading…
Reference in New Issue
Block a user