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