Skip to content

Instantly share code, notes, and snippets.

@mattparker
Last active November 28, 2021 17:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattparker/90a8e5b4411095e23403 to your computer and use it in GitHub Desktop.
Save mattparker/90a8e5b4411095e23403 to your computer and use it in GitHub Desktop.
running php tests with lcov/gcov - setup and getting close
# install lcov
apt-get update
apt-get install lcov
mkdir /usr/local/php70-gcov5
cd ~/php-src
./configure --enable-gcov --prefix=/usr/local/php70-gcov5 --with-apxs2=/usr/bin/apxs2 --with-gd --without-pear --with-jpeg-dir=/usr --with-png-dir=/usr --with-vpx-dir=/usr --with-freetype-dir=/usr --with-t1lib=/usr --enable-gd-native-ttf --enable-exif --with-config-file-path=/etc/php7 --with-config-file-scan-dir=/etc/php7/conf.d --with-mysql=/usr --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-zlib --with-gmp --with-zlib-dir=/usr --with-gettext --with-kerberos --with-imap-ssl --with-mcrypt=/usr/local --with-iconv --enable-sockets --with-openssl --with-pspell --with-pdo-mysql=mysqlnd --with-pdo-sqlite --enable-soap --enable-xmlreader --with-xsl --enable-ftp --enable-cgi --with-curl=/usr --with-tidy --with-xmlrpc --enable-mbstring --enable-sysvsem --enable-sysvshm --enable-shmop --with-readline --enable-fpm --enable-intl --enable-zip --with-imap --with-mysqli=mysqlnd --enable-calendar
make
make install
# failed on :
# phar
# signals
#
# running tests: getting close but not there yet http://www.hashbangcode.com/blog/php-testfest-uk-2010-and-testing-php
export TEST_PHP_EXECUTABLE=/usr/local/php70-gcov5/bin/php
./run-tests.php ext/calendar/tests/
lcov -directory ./ext/calendar -c -o tests.info
mkdir /var/www/default/coverage
genhtml tests.info -o /var/www/default/coverage
@mattparker
Copy link
Author

@mattparker
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment