This repository contains tests for litehtml.
Rendering tests depend on running environment. Currently tested and supported Linux distro: Ubuntu 24.04, Fedora 40.
The best way to run tests is using docker image. We've prepared Dockerfile to create the docker image, or use the
script run_render_tests.sh
. This script creates the docker image, build tests and run them.
To run tests in the docker container run the script run_render_tests.sh
:
./run_render_tests.sh /path/to/litehtml] 4
Arguments:
- Real path to the litehtml cloned repository
- Number of threads to use for
make
andctest
commands
Script will create the docker image and run building and testing inside container.
To build tests locally the following libraries are required: gdk-3.0 cairo pango pangocairo fontconfig If you are using Ubuntu runs command to install required packages:
apt-get install -yq --no-install-recommends --no-install-suggests libcairo2-dev libpango1.0-dev libgtk-3-dev
To build tests locally run commands:
mkdir build
cd build
cmake -DLITEHTML_PATH=/path/to/litehtml ../
make
ctest
Replace /path/to/litehtml
with real path to the cloned
It is possible to run tests from litehtml. Commands:
mkdir build
cd build
cmake -DLITEHTML_BUILD_TESTING=ON ../
make
ctest --test-dir litehtml-tests-build
Note: litehtml uses only predefined litehtml-tests
commit