README 2.0 KB

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