Blame README

nsz d14d36
simple libc tests based on the libc-testsuit
nsz d14d36
and libc-bench of dalias
nsz 7308b3
see http://git.etalabs.net/cgi-bin/gitweb.cgi
nsz 7308b3
nsz 7308b3
build tests:
nsz 7308b3
	cp Makefile.conf.def Makefile.conf
nsz 7308b3
	# edit Makefile.conf
nsz 7308b3
	make
nsz 7308b3
run tests:
nsz 7308b3
	./t
nsz d14d36
run benchmarks:
nsz d14d36
	./b
nsz 7308b3
nsz 7308b3
about the framework:
nsz 7308b3
nsz 7308b3
the only hook in the test framework is error(...) which
nsz 7308b3
prints a formatted message and sets the test to failed
nsz 7308b3
see common/test.h
nsz 7308b3
nsz d14d36
benchmark functions are repeatedly called with increasing
nsz d14d36
N until runing time is long enough, then time/N is printed
nsz d14d36
nsz 7308b3
in the root dir make builds an executable with all tests
nsz 7308b3
in a src/* dir make builds only local tests
nsz 7308b3
see Makefile.inc
nsz 7308b3
nsz 7308b3
a test function looks like
nsz 7308b3
	void test_foo() {
nsz 7308b3
		if (foo != 42)
nsz 7308b3
			error("foo=%d expected 42\n", foo);
nsz 7308b3
	}
nsz 7308b3
extern functions with name ~ /^test/ are recognized to be
nsz 7308b3
test functions
nsz 7308b3
see Makefile.inc
nsz 7308b3
nsz 7308b3
edit the generated main.h to exclude certain tests
nsz d14d36
see common/t.c for tests
nsz d14d36
see common/b.c for benchmarks