Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clerk: improve the test suite #214

Open
EmileRolley opened this issue Mar 6, 2022 · 0 comments
Open

Clerk: improve the test suite #214

EmileRolley opened this issue Mar 6, 2022 · 0 comments
Labels
🏗️ build system Build system or Makefile ✨ enhancement New feature or request

Comments

@EmileRolley
Copy link
Collaborator

#186 introduced some test for Clerk, however, there are very minimal and not enough at all.
It only allowed to setup alcotest and write some test case examples.

The goal is to have enough pertinent test cases to be confident of the validity of the Clerk behavior.

Solutions

There is two main solutions.

The first one is to continue with alcotest and just add test cases in test_clerk_driver.ml, therefore, this method will allow to have a different granularity for tests.

A second solution consists to extend Clerk by adding two new ninja rules: test_clerk and reset_clerk. This will allow to compare pre-generated correct build.ninja files with the one produced by the current build of Clerk. The main advantage of this method is to speed up the test case writing phase, indeed, writing test cases in OCaml could be very tedious: either Ninja_utils.ninja structure must be initialized by hand or the expected result of the Ninja_utils.format function is hard-coded in a string.

At the end, the two solutions could coexist, but to ensure the validity of the generated build.ninja files the second one should be easier to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏗️ build system Build system or Makefile ✨ enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant