| | 1 | = Caca Labs test suite = |
| | 2 | |
| | 3 | All our major projects feature an extensive test suite that checks the software for consistency, source code quality, features and regressions. |
| | 4 | |
| | 5 | The testsuite can be run by typing `make check` in the project’s top directory. |
| | 6 | |
| | 7 | == Source code checks == |
| | 8 | |
| | 9 | Most source code checks rely on the project’s ability to list all source files. This is done by putting the following `Makefile.am` snippet in all directories that contain source code: |
| | 10 | |
| | 11 | {{{ |
| | 12 | #!makefile |
| | 13 | echo-sources: ; echo $(SOURCES) |
| | 14 | }}} |
| | 15 | |
| | 16 | ... and the following snippet in the top directory `Makefile.am`: |
| | 17 | |
| | 18 | {{{ |
| | 19 | #!makefile |
| | 20 | echo-dirs: ; echo caca kernel src cxx examples ruby tools |
| | 21 | }}} |
| | 22 | |
| | 23 | '''check-source''' performs a source code quality check. It checks for the following coding style errors: |
| | 24 | * no source code file should contains tabs |
| | 25 | * no source code file should contain trailing spaces |
| | 26 | |
| | 27 | '''check-copyright''' performs a copyright statement check. The following tests are performed: |
| | 28 | * all source code files must contain a “`Copyright (c)`” statement |
| | 29 | * all source code files must mention the year of the last modification (this check is only performed when in a git-svn repository) |
| | 30 | |
| | 31 | '''check-win32''' performs a Win32 port consistency check. The following tests are performed: |
| | 32 | * all preprocessor tokens in `config.h.in` must appear in `msvc/config.h` |