4 Following make targets are avaialable
8 This will compile and link the tests
12 This will check for binaries, if they are not there it
13 will call 'compile' target, then it will execute all the tests.
18 This will build and run tests.
20 The following make variables may help you in testing:
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.
30 So, to just run the uClibc tests, try this:
31 make check UCLIBC_ONLY=1
33 If you need to test just a subset of all test, delete subdirectories
36 As of 2009-07, build machinery does not track dependencies on uclibc.
37 If you edit a header and re-run "make compile", it does not re-install it
38 into ../install_dir. If you delete ../install_dir, "make compile"
39 rebuilds uclibc as needed and re-installs ../install_dir,
40 but still does not rebuild testcases.
41 (You can work around it by "touch */*.c" for now).
47 The 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
57 Each subdir has a Makefile (same for any subdir) that must include in strict order:
58 - the upper-level Rules.mak file
60 - the upper-level Test.mak file
61 Makefile.in may be used to define the TESTS and TESTS_DISABLED variables.
62 If you do not, TESTS is built automatically based upon all the .c files in the subdir.
65 Each test must use a similar .c name; so the "foo" test needs a "foo.c".
67 Additionally, the following options further control specific test behavior:
68 CFLAGS_foo := extra cflags to use to compile test
69 DODIFF_foo := compare the output of the glibc and uClibc tests (see below)
70 LDFLAGS_foo := extra ldflags to use to link test
71 OPTS_foo := extra options to pass to test
72 RET_foo := expected exit code of test; default is 0
73 WRAPPER_foo := execute stuff just before test
75 Or to control all tests in a subdir:
76 EXTRA_CLEAN := extra files to remove in the clean target
77 EXTRA_DIRS := extra directories to remove in the clean target
79 EXTRA_LDFLAGS := -lpthread
83 If you want to compare the output of a test with known good output, then just
84 create 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".