An interpreter for the basic Lutin script programming language.
You can specify several options to the program. All options are usable together.
-pprints the parsed program-arealizes a static analysis of the programm to detect semantic errors.-ooptimizes the program-eexecutes the program
makecreates the Objects/ folder, where all the .o files are compiled to, and creates alutexecutable at the same level as the Makefilemake cleandeletes the Objects/ directory and the generatedlutexecutable.make remakecleans and makes the projectmake testcompiles the project and launches the tests (in the Tests/ folder)make coveragecompiles the project, launches the tests, processes the generated coverage data and displays them in firefox if installed
We use the GNU test coverage gcov, with the commands lcov and genhtml.
The file coverage.sh (in folder Tests/) :
- Compiles the project, and creates .gcno files in Objects/
- Sets
GCOV_PREFIXandGCOV_PREFIX_STRIPSa coverage folder in the Objects/. - Launches all tests and creates .gcda files
- Process the information with
lcov(based on the .gcda files) genhtmlgenerates a nice html, with css, to see the results
Now you just have to open Objects/cov_html/index.html and you see a beautiful interface for test coverage.