Automated testing and modernizing
(This issue was originally posted on CMake's previous repository by zbeekman.)
I was just wondering if you had any interest in automating some testing, as well as modernizing the README. I’m just spitballing here, but if you like copy the text and add a check next to anything that appeals to you, with whatever comments.
If any of this appeals to you I could work up a pull request. Here are some ideas:
-
Add a CMakeLists.txt
file in thetests
directory withenable_testing()
andadd_test()
to drive each of the tests.-
this could be included from the root CMakeLists.txt
and would add atests
target to theMakefile
to run the tests -
chktex could be used (or lacheck or similar) to lint the UseLATEX.tex file to check for new errors being introduced
-
-
Moving README
toREADME.md
for fancy formating etc. -
Use travis-ci to test commits and pull requests using the added tests above, as well as testing that the UseLATEX.tex document builds correctly. -
Use travis-ci to automate deployment: -
travis-ci can create github releases whenever a new tag is created -
travis-ci can run almost arbitrary commands to accomplish other deployment tasks, possibly scripting updating the UseLATEX entry and linked files on the CMake wiki, for example. -
gh-pages could be used to archive and create a reference of compiled UseLATEX PDF manuals from previous tags, and travis-ci could auto deploy manuals for new tags, updates to master (development version) etc.
-
-
Better detection of problems with tests. -
search the .log file for signs of trouble. This is overwritten each time the latex command is run, and I usually add a search for undefined references once the build is finished. -
run chktex on your input LaTeX. This won’t ensure that UseLATEX.cmake works properly, but WILL ensure you minimize documentation errors and that the tex you pass to UseLATEX as tests is correct. -
use tools like pdftotext to extract text from generated PDFs and compare against known correct output -
use something like diff-pdf to generate PDFs highlighting the differences between known valid output and current output—these would still have to be checked by hand at some point but might make this process easier.
-
Some of this might be overkill, but automated testing and CI can be quite nice.