| 1 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |
| 2 |
|
| 3 |
To run the tests suite, all you need is (add the cmake options if you need any |
| 4 |
or if the default libs and include paths are not the default) : |
| 5 |
|
| 6 |
In a sub directory: |
| 7 |
$ mkdir bld |
| 8 |
$ cd bld |
| 9 |
$ cmake -DBUILD_TEST=1 .. |
| 10 |
$ make |
| 11 |
$ ctest . |
| 12 |
|
| 13 |
Or if you like to build in the source tree: |
| 14 |
$ cmake -DBUILD_TEST=1 . |
| 15 |
$ make |
| 16 |
$ ctest . |
| 17 |
|
| 18 |
Add "-DCMAKE_BUILD_TYPE=DEBUG" if you like to have a debug version. |
| 19 |
|
| 20 |
If you like to run the tests against a installed GD library, set the following |
| 21 |
environment variables: |
| 22 |
|
| 23 |
export CMAKE_INCLUDE_PATH=/path/to/the/gd/include |
| 24 |
export CMAKE_LIBRARY_PATH=/path/to/the/gd/lib |
| 25 |
|
| 26 |
then call cmake using: |
| 27 |
|
| 28 |
$ cmake -DUSE_EXT_GD=1 -DBUILD_TEST=1 |
| 29 |
$ make |
| 30 |
and finally: |
| 31 |
|
| 32 |
$ ctest . |
| 33 |
|
| 34 |
I will certainly add a nice CMake option to give prefix later. |
| 35 |
|
| 36 |
What to do if tests fail on your platform and you use the last GD release? |
| 37 |
either from your favorite distributions or from https://www.libgd.org or git? |
| 38 |
|
| 39 |
If you use a packaged version of the GD Library (installed from RPM, deb or |
| 40 |
ports, gentoo packages or any other packages format or distribution), please try |
| 41 |
to run the tests using the source releases available at: |
| 42 |
|
| 43 |
https://github.com/libgd/libgd/releases |
| 44 |
|
| 45 |
If the tests fail using our source release, please report a bug here: |
| 46 |
|
| 47 |
https://github.com/libgd/libgd/issues |
| 48 |
|
| 49 |
You can attach the two files available in: |
| 50 |
|
| 51 |
./Testing/Temporary |
| 52 |
|
| 53 |
Later versions will have an automatic post mode. |
| 54 |
|
| 55 |
If the tests do not run successfully, please report a bug to the maintainer of the |
| 56 |
packages (Debian, BSD, Ubuntu or whoever is responsible for the packages). |
| 57 |
|
| 58 |
Reasons of failures: |
| 59 |
Exception: SegFault: self explaining |
| 60 |
Failed test failed, check the log to know where |
| 61 |
timeout the default timeout is 5 seconds. Some test may |
| 62 |
have infinite loops when compiled against old versions |
| 63 |
of the GD library (esp. 2.0.33 or earlier) |
| 64 |
|
| 65 |
Some features rely on floating point arithmetic and results may vary from |
| 66 |
one architecture to another. |
| 67 |
Examples: |
| 68 |
On i686, gdimagerotate/bug00067 will fail. The result is still visually |
| 69 |
acceptable but i686 default arithmetic mode will generate different results. |
| 70 |
Adding "-msse -mfpmath=sse" to CFLAGS will solve this difference. |
| 71 |
On s390, ppc64, and aarch64, gdimagecopyresampled/bug00201 will fail. |
| 72 |
The result is still visually acceptable. |
| 73 |
Adding "-ffp-contract=off" to CFLAGS will solve this difference. |