1-----------
2 For: User
3-----------
4Following make targets are avaialable
5
6make compile
7
8This will compile and link the tests
9
10make run
11
12This will check for binaries, if they are not there it
13will call 'compile' target, then it will execute all the tests.
14
15make check
16make all
17
18This will build and run tests.
19
20The following make variables may help you in testing:
21
22 - UCLIBC_ONLY  - only run tests against uClibc
23 - GLIBC_ONLY   - only run tests against glibc
24 - V / VERBOSE  - run tests with a lot of output
25 - TEST_INSTALLED_UCLIBC - Test installed libraries
26                           under /lib and /usr/lib.
27 - TIMEOUTFACTOR=nn - increase test timeout nn times.
28                  At least REGEX_OLD + regex/tst-regex2 needs it increased.
29
30So, to just run the uClibc tests, try this:
31make check UCLIBC_ONLY=1
32
33If you need to test just a subset of all test, delete subdirectories
34you do not need.
35
36As of 2009-07, build machinery does not track dependencies on uclibc.
37If you edit a header and re-run "make compile", it does not re-install it
38into ../install_dir. If you delete ../install_dir, "make compile"
39rebuilds uclibc as needed and re-installs ../install_dir,
40but still does not rebuild testcases.
41(You can work around it by "touch */*.c" for now).
42
43----------------
44 For: Developer
45----------------
46
47The structure of this test system is:
48 test/                    toplevel dir containing common test code
49 test/Rules.mak           Common build code
50 test/Test.mak            Runtime test make code
51 test/subdir/             code specific to a subsystem is stored in a subdir
52 test/subdir/Makefile.in  describe the tests to run
53 test/subdir/Makefile     test entry point, includes needed upper-level
54                          makefiles plus Makefile.in
55 test/subdir/*.c          the tests
56
57Each subdir has a Makefile (same for any subdir) that must include in strict order:
58  - the upper-level Rules.mak file
59  - the Makefile.in
60  - the upper-level Test.mak file
61Makefile.in may be used to define the TESTS and TESTS_DISABLED variables.
62If you do not, TESTS is built automatically based upon all the .c files in the subdir.
63TESTS := foo
64TESTS_DISABLED := bar
65Each test must use a similar .c name; so the "foo" test needs a "foo.c".
66
67Additionally, the following options further control specific test behavior:
68CFLAGS_foo    := extra cflags to use to compile test
69DODIFF_foo    := compare the output of the glibc and uClibc tests (see below)
70LDFLAGS_foo   := extra ldflags to use to link test
71OPTS_foo      := extra options to pass to test
72RET_foo       := expected exit code of test; default is 0
73WRAPPER_foo   := execute stuff just before test
74
75Or to control all tests in a subdir:
76EXTRA_CLEAN   := extra files to remove in the clean target
77EXTRA_DIRS    := extra directories to remove in the clean target
78EXTRA_CFLAGS  := -DFOO
79EXTRA_LDFLAGS := -lpthread
80OPTS          :=
81WRAPPER       :=
82
83If you want to compare the output of a test with known good output, then just
84create a local file named "foo.out.good" and the output generated by the test
85"foo" will be automatically stored in "foo.out" and compared to "foo.out.good".
86