X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=README;h=ce2ba8e949c9bbc77d14cfe10d107a7c366f1f4c;hb=e08536f1d89384f1cda546202bac60d57fc8aba7;hp=635966d4b5cf36ccab45f01d39be31b3201acf45;hpb=7308b342633ce6b61ec9b33e06e630622058ebcf;p=libc-test diff --git a/README b/README index 635966d..ce2ba8e 100644 --- a/README +++ b/README @@ -1,23 +1,22 @@ -simple libc tests based on the libc-testsuit of dalias +simple libc tests +based on the libc-testsuit and libc-bench of dalias see http://git.etalabs.net/cgi-bin/gitweb.cgi build tests: - cp Makefile.conf.def Makefile.conf - # edit Makefile.conf + cp dist/config.mak . + # edit config.mak make run tests: - ./t + make t +run benchmarks: + make b -about the framework: +framework: the only hook in the test framework is error(...) which prints a formatted message and sets the test to failed see common/test.h -in the root dir make builds an executable with all tests -in a src/* dir make builds only local tests -see Makefile.inc - a test function looks like void test_foo() { if (foo != 42) @@ -25,7 +24,15 @@ a test function looks like } extern functions with name ~ /^test/ are recognized to be test functions -see Makefile.inc -edit the generated main.h to exclude certain tests -see common/main.c +a benchmark function looks like + void bench_foo(int N) { + for (i = 0; i < N; i++) + foo(); + } +benchmark functions are repeatedly called with an increasing +N until the running time is long enough, then time/N is printed + +see Makefile.inc for build system details +see common/t.c for test details +see common/b.c for benchmark details