Test suite improvement
As of v1.7.0, the test suite consists of two parts:
- https://github.com/ocaml-community/cppo/tree/master/test, where
*.cppois expected to produce*.ref.- Limitation: Code/feature coverage not yet measured.
- CI that tests downstream dependants:
https://github.com/ocaml-community/cppo/blob/21f05862d6b800e72914d37a7cefa3269442baca/.github/workflows/build.yml#L176-L198
- Limitation 1: Only checks compilation and package-specified test; might break the semantics of under-tested packages.
- Limitation 2: Skipping build/test for packages, for various reasons: Some packages are out of maintenance; others are failing in specific OCaml*OS versions.
Possible directions:
- [ ] For users: Document each feature with a test case.
- [ ] For devs: Annotate each branch condition with a test case.
- [ ] For CI: Refine the exclusion list from (package + OCamlVersion + OSVersion) to (package * OCamlVersion * OSVersion).
Perhaps we could single out a few source files, in these packages, that use cppo in a heavy way (or in an interesting way, in some sense) and add these source files directly to our test suite. This would ensure that any change in the output of cppo, for these specific files, is detected.
By the way, I notice that the files *.yml seem to mention several old OCaml versions, up to 4.07, but no newer version. Is this intended? Should we update these files so as to test cppo on 4.08-4.14 and 5.x?
(I could also add a Makefile entry that runs make test in several local opam switches.)
By the way, I notice that the files
*.ymlseem to mention several old OCaml versions, up to 4.07, but no newer version. Is this intended? Should we update these files so as to testcppoon 4.08-4.14 and 5.x?
Did you mean https://github.com/ocaml-community/cppo/blob/master/.github/workflows/build.yml ? The exclusions there are due to ocaml/setup-ocaml#828.
No, I meant the files .travis.yml and appveyor.yml at the root of the cppo repository. (I must say that I don't know what these files are used for.)
Those files are obsoleted since #79. Should be safe to remove.
Thanks, I have removed these files. By the way (sorry if this is a bit off topic here), I see that many CI runs currently fail with make: dune: No such file or directory, but I have no idea why that is.
Let's track it in #99