OSDN Git Service

test/regex/tst-regex2.c: fix the rest of testsuite failures
[uclinux-h8/uClibc.git] / test / README
1 -----------
2  For: User
3 -----------
4 Following make targets are avaialable
5
6 make compile
7
8 This will compile and link the tests
9
10 make run
11
12 This will check for binaries if they are not there it
13 will call 'compile' target then it will execute all the
14 tests.
15
16 make check
17 make all
18
19 This will build and run tests.
20
21 The following make variables may help you in testing:
22
23  - UCLIBC_ONLY  - only run tests against uClibc
24  - GLIBC_ONLY   - only run tests against glibc
25  - V / VERBOSE  - run tests with a lot of output
26  - TEST_INSTALLED_UCLIBC - Test installed libraries 
27                            under /lib and /usr/lib.
28  - TIMEOUTFACTOR=nn - increase test timeout nn times.
29                   At least REGEX_OLD + regex/tst-regex2 needs it increased.
30
31 So, to just run the uClibc tests, try this:
32 make check UCLIBC_ONLY=1
33
34 ----------------
35  For: Developer
36 ----------------
37
38 The structure of this test system is:
39  test/                 toplevel dir containing common test code
40  test/Rules.mak        Common build code
41  test/Test.mak         Runtime test make code
42  test/subdir/          code specific to a subsystem is stored in a subdir
43  test/subdir/Makefile  describe the tests to run
44  test/subdir/*.c       the tests
45
46 Each subdir Makefile must include the toplevel Test.mak file.  Before doing so,
47 you may define the TESTS and TESTS_DISABLED variables.  If you do not, TESTS
48 is built automatically based upon all the .c files in the subdir.
49 TESTS := foo
50 TESTS_DISABLED := bar
51 include ../Test.mak
52 Each test must use a similar .c name; so the "foo" test needs a "foo.c".
53
54 Additionally, the following options further control specific test behavior:
55 CFLAGS_foo    := extra cflags to use to compile test
56 DODIFF_foo    := compare the output of the glibc and uClibc tests (see below)
57 LDFLAGS_foo   := extra ldflags to use to link test
58 OPTS_foo      := extra options to pass to test
59 RET_foo       := expected exit code of test; default is 0
60 WRAPPER_foo   := execute stuff just before test
61
62 Or to control all tests in a subdir:
63 EXTRA_CLEAN   := extra files to remove in the clean target
64 EXTRA_DIRS    := extra directories to remove in the clean target
65 EXTRA_CFLAGS  := -DFOO
66 EXTRA_LDFLAGS := -lpthread
67 OPTS          := 
68 WRAPPER       := 
69
70 If you want to compare the output of a test with known good output, then just
71 create a local file named "foo.out.good" and the output generated by the test
72 "foo" will be automatically stored in "foo.out" and compared to "foo.out.good".