README 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 define the TESTS variable and include the
  22. toplevel Test.mak file:
  23. TESTS := foo
  24. include ../Test.mak
  25. Each test must use a similar .c name; so the "foo" test needs a "foo.c".
  26. Additionally, the following options further control specific test behavior:
  27. CFLAGS_foo := extra cflags to use to compile test
  28. DODIFF_foo := compare the output of the glibc and uClibc tests (see below)
  29. LDFLAGS_foo := extra ldflags to use to link test
  30. OPTS_foo := extra options to pass to test
  31. RET_foo := expected exit code of test; default is 0
  32. WRAPPER_foo := execute stuff just before test
  33. Or to control all tests in a subdir:
  34. EXTRA_CLEAN := extra files to remove in the clean target
  35. EXTRA_CFLAGS := -DFOO
  36. EXTRA_LDFLAGS := -lpthread
  37. OPTS :=
  38. WRAPPER :=
  39. If you want to compare the output of a test with known good output, then just
  40. create a local file named "foo.out.good" and the output generated by the test
  41. "foo" will be automatically stored in "foo.out" and compared to "foo.out.good".