README 2.4 KB

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