README 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. -----------
  2. For: User
  3. -----------
  4. The following make variables may help you in testing:
  5. - UCLIBC_ONLY - only run tests against uClibc
  6. - GLIBC_ONLY - only run tests against glibc
  7. - COMPILE_ONLY - just build the tests, don't run them
  8. - V / VERBOSE - run tests with a lot of output
  9. So, to just run the uClibc tests, try this:
  10. make check UCLIBC_ONLY=1
  11. ----------------
  12. For: Developer
  13. ----------------
  14. The structure of this test system is:
  15. test/ toplevel dir containing common test code
  16. test/Rules.mak Common build code
  17. test/Test.mak Runtime test make code
  18. test/subdir/ code specific to a subsystem is stored in a subdir
  19. test/subdir/Makefile describe the tests to run
  20. test/subdir/*.c the tests
  21. Each subdir Makefile must include the toplevel Test.mak file. Before doing so,
  22. you may define the TESTS and TESTS_DISABLED variables. If you do not, TESTS
  23. is built automatically based upon all the .c files in the subdir.
  24. TESTS := foo
  25. TESTS_DISABLED := bar
  26. include ../Test.mak
  27. Each test must use a similar .c name; so the "foo" test needs a "foo.c".
  28. Additionally, the following options further control specific test behavior:
  29. CFLAGS_foo := extra cflags to use to compile test
  30. DODIFF_foo := compare the output of the glibc and uClibc tests (see below)
  31. LDFLAGS_foo := extra ldflags to use to link test
  32. OPTS_foo := extra options to pass to test
  33. RET_foo := expected exit code of test; default is 0
  34. WRAPPER_foo := execute stuff just before test
  35. Or to control all tests in a subdir:
  36. EXTRA_CLEAN := extra files to remove in the clean target
  37. EXTRA_CFLAGS := -DFOO
  38. EXTRA_LDFLAGS := -lpthread
  39. OPTS :=
  40. WRAPPER :=
  41. If you want to compare the output of a test with known good output, then just
  42. create a local file named "foo.out.good" and the output generated by the test
  43. "foo" will be automatically stored in "foo.out" and compared to "foo.out.good".