https://github.com/litehtml/litehtml-tests
This repository contains tests for litethtml
https://github.com/litehtml/litehtml-tests
Last synced: 19 days ago
JSON representation
This repository contains tests for litethtml
- Host: GitHub
- URL: https://github.com/litehtml/litehtml-tests
- Owner: litehtml
- Created: 2024-09-09T23:48:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-03T22:38:00.000Z (10 months ago)
- Last Synced: 2025-04-16T08:35:37.374Z (10 months ago)
- Language: HTML
- Size: 41 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tests for litehml
This repository contains tests for [litehtml](https://github.com/litehtml/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.
## Running tests in the docker container
To run tests in the docker container run the script ```run_render_tests.sh```:
```shell
./run_render_tests.sh /path/to/litehtml] 4
```
Arguments:
1. Real path to the litehtml cloned repository
2. Number of threads to use for ```make``` and ```ctest``` commands
Script will create the docker image and run building and testing inside container.
## Running test locally
### Pre-requirements
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:
```shell
apt-get install -yq --no-install-recommends --no-install-suggests libcairo2-dev libpango1.0-dev libgtk-3-dev
```
### Build tests
To build tests locally run commands:
```shell
mkdir build
cd build
cmake -DLITEHTML_PATH=/path/to/litehtml ../
make
ctest
```
Replace ```/path/to/litehtml``` with real path to the cloned
### Build and run tests from the litehtml repository
It is possible to run tests from [litehtml](https://github.com/litehtml/litehtml). Commands:
```shell
mkdir build
cd build
cmake -DLITEHTML_BUILD_TESTING=ON ../
make
ctest --test-dir litehtml-tests-build
```
**Note**: litehtml uses only predefined ```litehtml-tests``` commit