Tests (./test
)
requires sudo apt-get install dejagnu
The idea is to run those tests before each commit.
All tests are controlled by file:test/Makefile; which runs the lus2lic compiler with various options on every files contained in
- file:tests/should_work/ that contains correct Lustre V6 programs
- file:tests/should_fail/ that contains incorrect ones (e.g., that contains a type error).
- file:tests/should_work/broken and file:tests/should_fail/broken that contain broken tests
a ‘make test’ in this test
dir will run quite a lot of tests, and
generate several files:
- file:testslus2lic.sum: a summary generated by the runtest (dejagnu) program
- lus2lic.log: a log file generated by runtest
- lus2lic.diff: which is a diff betwenn lus2lic.log and lus2lic.log.ref
‘make test’ exits normally iff lus2lic.diff
is empty.
‘make utest’ will update the lus2lic.log.ref
‘make test’ is actually equivalent to ‘make nonreg’ plus ‘make prog’. The goal is that:
- ‘make nonreg’ have no unexpected failures/successes
- ‘make prog’ have no expected failures/successes
Hence, before issuing a ‘make utest’, it is better if it is the case unless you plan to fix the problems in the very short term.
Sources (./src
)
‘make html’ in the top directory produces html doc that can be browsed here: file:ocamldoc/index.html
Here follows a description of the different modules used by this lus2lic compiler (in src)
First of all, the Lustre files are parsed
lxm.{ml|mli}
lexer.mll
parser.mly
lv6parserUtils.ml
astCore.ml
astV6.ml
astPredef.ml
Lv6Id.{ml|mli}
and put input tables performing some checks along the way (references)
astTab.{ml|mli}
astTabSymbol.{ml|mli}
astV6Dump.{ml|mli}