README.md
1#SIRIL test suites
2=====
3
4##Prerequisites
5-------
6* First, you need to compile Siril
7
8 mkdir _build
9 meson --buildtype release _build
10 cd _build
11 ninja
12 ninja install
13
14* Then, Siril test suites use [criterion](criterion https://criterion.readthedocs.io/en/master/intro.html). If your distribution does not have any packages, you need to compile it by following instruction [here](https://github.com/Snaipe/Criterion.git).
15
16
17
18##Running tests
19------
20###What are inside test directory?
21There are different kinds of files in this directory:
22- `compare_fits` is a program that can be used to compare FITS files, to verify
23 that an algorithm always computes the same thing for example
24- `sorting` is a unit test on the three sorting implementations that provide the
25 median. It also contains a performance evaluation between them.
26
27Other files are used for the build of these executables. Since they depend on
28siril's code and we don't want to pull all the files here, we had to redefine
29the functions used in the direct dependencies in dummy.c, they should not be
30used in the tests.
31
32###Using criterion
33
34 meson test (or meson test -C _build from src)
35 meson test -v
36
37###Using test script
38
39To compile the test programs, compile siril then run ./build.sh.
40Since sorting makes some performance tests, siril has to be compiled with -O2
41to have real use values.
42
43If build error occurs, check that the basic build script has all required
44package links for your OS and options for your compiler.
45If link error occurs, add the missing functions in dummy.c
46