Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/litehtml/litehtml-tests
This repository contains tests for litethtml
https://github.com/litehtml/litehtml-tests
Last synced: 15 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 (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-05T12:08:20.000Z (3 months ago)
- Last Synced: 2024-11-06T07:21:28.008Z (2 months ago)
- Language: HTML
- Size: 38.6 MB
- Stars: 0
- Watchers: 2
- 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``` commandsScript 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