From 4d90c6f13e7a06cfe7957d7e4d28a29acd7db9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Tue, 24 Sep 2024 17:05:10 +0200 Subject: [PATCH] Document how to run part of the test suite --- CONTRIBUTING.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 580870903..b7dcb85e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ $ php --ri mongodb ## Generating arginfo from stub files Arginfo structures are generated from stub files using the `gen_stub.php` -file. Note that this requires `phpize` to be run for PHP 8.2 to make use +file. Note that this requires `phpize` to be run for **PHP 8.2** to make use of all features. After changing a stub file, run `./build/gen_stub.php` to regenerate the corresponding arginfo files and commit the results. @@ -44,6 +44,15 @@ when using this extension. To generate the function map, run the ## Testing +The driver includes a test suite that can be run with `make test`. To run a single +test file, define the `TESTS` variable with the file path: + +``` +make test TESTS=tests/.phpt +``` + +### File format + The extension's test use the PHPT format from PHP internals. This format is documented in the following links: