-
Notifications
You must be signed in to change notification settings - Fork 42
Manually regenerating regression tests with a custom built frontend
This repository contains the following types of tests:
- tests written in Haskell, in
kore/test
, which we usually refer to as unit tests, even though many of them test multiple functionalities together - K tests, in
test
, where the backend is tested against minimized K programs/specs - kore tests, in
test/regression-...
; these are full semantics tests, imported from downstream projects
We usually refer to (2) and (3) as integration tests, since they also depend on the K frontend and on different projects which use K.
Sometimes, when talking about regression tests we refer to specifically (3).
This is usually done automatically: there is a weekly update job which runs during the weekend and updates the files using the current deps/k_release
.
There are scenarios where this update needs to be done manually: this most likely means the frontend has undergone a breaking change and we need to stop supporting the old frontend in the backend, but the frontend requires being built with a modified src/main/kore/prelude.kore
, which lives in the backend's repository.
An example would be: the encoding of equations has changed, meaning that the frontend generates the kore for equations differently. The backend should support this new encoding, and remove support for the old one. The prelude.kore
file contains equations which need to be manually rewritten in the new encoding. See PR 2890 which removes the support for the old equation encoding.
- Change
prelude.kore
accordingly, commit and push to a branch - Clone https://github.com/kframework/k and switch to the branch associated to the release in use by the backend
- In K's submodule of the backend, checkout the branch with the modified
prelude.kore
- Build K and add to path
- In the root of the backend repository, run
scripts/generate-regression-tests.sh
- If the script succeeds, commit and push the changes to the regression tests