readme update
[libc-test] / README
1 simple libc tests based on the libc-testsuit
2 and libc-bench of dalias
3 see http://git.etalabs.net/cgi-bin/gitweb.cgi
4
5 build tests:
6         cp Makefile.conf.def Makefile.conf
7         # edit Makefile.conf
8         make
9 run tests:
10         ./t
11 run benchmarks:
12         ./b
13
14 about the framework:
15
16 the only hook in the test framework is error(...) which
17 prints a formatted message and sets the test to failed
18 see common/test.h
19
20 benchmark functions are repeatedly called with increasing
21 N until runing time is long enough, then time/N is printed
22
23 in the root dir make builds an executable with all tests
24 in a src/* dir make builds only local tests
25 see Makefile.inc
26
27 a test function looks like
28         void test_foo() {
29                 if (foo != 42)
30                         error("foo=%d expected 42\n", foo);
31         }
32 extern functions with name ~ /^test/ are recognized to be
33 test functions
34 see Makefile.inc
35
36 edit the generated main.h to exclude certain tests
37 see common/t.c for tests
38 see common/b.c for benchmarks