• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

estimate_matsize/H03-May-2022-179139

filter/H03-May-2022-205160

gf2x/H03-May-2022-11286

linalg/H03-May-2022-17,20614,105

misc/H03-May-2022-205171

polyselect/H03-May-2022-362287

scripts/cadofactor/H03-May-2022-2517

sieve/H03-May-2022-14,0709,042

sqrt/H03-May-2022-870858

utils/H03-May-2022-18,91017,103

READMEH A D16-Sep-20213 KiB7863

do_with_mpi.shH A D16-Sep-20211.3 KiB5442

guess_mpi_configs.shH A D16-Sep-20215.6 KiB173121

ncpus.shH A D16-Sep-20211.4 KiB4631

provide-wdir.shH A D16-Sep-20212.9 KiB11859

test_gfp2_2_2g.shH A D16-Sep-20212.1 KiB10078

test_gfp3.shH A D16-Sep-20211.5 KiB7556

test_iceildiv.cH A D16-Sep-20211.2 KiB5347

test_iter.cH A D16-Sep-20211.8 KiB9179

test_iter.hH A D16-Sep-2021823 3422

test_tests_common.cH A D16-Sep-2021195 97

tests_common.cH A D16-Sep-20214.4 KiB208178

tests_common.hH A D16-Sep-20212 KiB5730

README

1This tests/ directory contains many tests.
2
3To run them, run "make check" at the top-level cado-nfs directory.
4
5Note that "make check" and "make test" do the same thing (although the
6former enables some extra verbose flags). The reason why both exist is
7historical only.
8
9** Running tests in parallel
10----------------------------
11
12Typing
13  make -j check
14is not enough: this will use parallelism only during the build process.
15In order to get parallelism during the tests themselves, use:
16  make check ARGS="-j"
17The combination
18  make -j check ARGS="-j"
19should work and use parallelism at every level (except a bug in cmake might
20make some tests fail with ARGS="-j" due to a collision in dependencies).
21
22Of course you are free to cap the number of processes spawned, by
23providing an integer argument to the -j option. Note that running tests
24also entails some build work, since tests may have dependencies which are
25not otherwise built by default.
26
27** Running only one test
28------------------------
29
30If only one test is wanted, it is possible to specify it, again within
31the ARGS parameter. For instance, to run only the 'test_memusage' check,
32use:
33  make check ARGS="-R test_memusage"
34
35Note that the argument to -R is a regular expression, so in the example
36above, if a test called test_memusage2 exists it gets run too.
37
38If one wants to see exactly which commands are run and keep the
39intermediate data, even if the test succeeds, here is the incantation:
40  CADO_DEBUG=1 ctest_filter=no make check ARGS="-R test_memusage"
41
42Note also that due to a bug in CTest, some dependencies are not properly
43run first when doing say make check ARGS="-R F9_fakereltest". You should
44first run manually make check ARGS="-R F9_makefb".
45
46** Expensive tests
47------------------
48
49Some tests are costly and we do not expect users to run them after each
50compilation. They can however be activated by setting the environment
51variable CHECKS_EXPENSIVE.
52For instance, under bash, run:
53  export CHECKS_EXPENSIVE=yes
54  make cmake
55  make check
56The second line is necessary, so that cmake really takes the newly set
57environment into account.
58
59** Adding new tests
60-------------------
61
62Unitary tests should go in the subdirectory of tests/ corresponding to
63the same subdirectory where the function is defined in the source tree.
64Then, add a new C-file, with a name like test_myfunction.c, and the main
65should exercise myfunction(). If everything is ok, the main should return
66EXIT_SUCCESS (and anything else otherwise, from segfault to
67EXIT_FAILURE).
68Finally, edit CMakeLists.txt in the same directory, and add a line like
69    cado_define_test(test_init_norms_bucket_region.cpp
70        LIBRARIES las-norms utils tests)
71The two cmake macros to be used for defining new tests are
72        cado_define_test
73    and cado_divert_test.
74Their documentation is in tests/CMakeLists.txt ; In greater generality,
75these functions also allow to run a shell script or more generally any
76executable. Browse the subdirectories and the CMakeLists.txt to get
77examples.
78