зеркало из https://github.com/mono/libgdiplus.git
Add instructions for code coverage
This commit is contained in:
Родитель
850a20f2a2
Коммит
00260262d1
|
@ -86,3 +86,11 @@ Icon
|
||||||
Network Trash Folder
|
Network Trash Folder
|
||||||
Temporary Items
|
Temporary Items
|
||||||
.apdisk
|
.apdisk
|
||||||
|
|
||||||
|
# gcc coverage testing tool files
|
||||||
|
*.gcno
|
||||||
|
*.gcda
|
||||||
|
*.gcov
|
||||||
|
coverage.info
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
|
15
README.md
15
README.md
|
@ -60,6 +60,21 @@ To run the tests with Clang sanitizers, run the following command from the root
|
||||||
./autogen.sh --enable-asan
|
./autogen.sh --enable-asan
|
||||||
make check
|
make check
|
||||||
|
|
||||||
|
### Code coverage
|
||||||
|
|
||||||
|
Code coverage stats are generated with `lcov`. You can use [Homebrew](https://brew.sh/) on **OSX** to install the dependencies:
|
||||||
|
|
||||||
|
brew install lcov
|
||||||
|
|
||||||
|
To run the tests with code coverage, run the following commands from the root of the repository:
|
||||||
|
|
||||||
|
./autogen.sh --enable-coverage
|
||||||
|
make check
|
||||||
|
lcov --capture --directory src --output-file coverage.info
|
||||||
|
genhtml coverage.info --output-directory coverage
|
||||||
|
|
||||||
|
To view the coverage report, navigate to the `coverage` directory in the root of the repository and open `index.html`.
|
||||||
|
|
||||||
### Installing libgdiplus
|
### Installing libgdiplus
|
||||||
|
|
||||||
Run the following command from the root of the repository:
|
Run the following command from the root of the repository:
|
||||||
|
|
|
@ -46,6 +46,13 @@ if test $asan = "yes"; then
|
||||||
LDFLAGS="$LDFLAGS -fsanitize=address,signed-integer-overflow,undefined"
|
LDFLAGS="$LDFLAGS -fsanitize=address,signed-integer-overflow,undefined"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage],[Enable code coverage.]),[coverage=yes],[coverage=no])
|
||||||
|
|
||||||
|
if test $coverage = "yes"; then
|
||||||
|
GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS --coverage -g"
|
||||||
|
LDFLAGS="$LDFLAGS --coverage"
|
||||||
|
fi
|
||||||
|
|
||||||
CAIRO_LIBS="`pkg-config --libs cairo `"
|
CAIRO_LIBS="`pkg-config --libs cairo `"
|
||||||
CAIRO_CFLAGS="`pkg-config --cflags cairo `"
|
CAIRO_CFLAGS="`pkg-config --cflags cairo `"
|
||||||
cairo_info="`pkg-config --modversion cairo ` (system)"
|
cairo_info="`pkg-config --modversion cairo ` (system)"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче