-
Notifications
You must be signed in to change notification settings - Fork 44
Testing
To run all integration tests, run make test in the test/ directory.
To execute integration tests only from one subfolder of test/, run from project root:
make -C "test/issue-2700" test
To accept new output as correct for a golden test, cd into its subdirectory, delete the golden file, and make with the golden file's name as the target.
Run unit tests that match an awk pattern:
stack test --test-arguments '--pattern "$(NF-1) ~ /Set/ && $NF ~ /matches/ "'
Here we run test that has Matcher in its module name ($0) and Set in its
test group ($(NF -1)). NF stands for Number of Fields, i.e. $NF is the last
field in the test table, which is the test name from the source file.
Add a -l before the last double quotation mark to list the tests without running them.
One can also do the same with cabal:
cabal run kore-test -- --pattern '$(NF-1) ~ /Set/ && $NF ~ /matches/'
-
Modify generate-regression-tests.sh, adding or modifying regression tests under
generate-evm()andgenerate-wasm()as necessary. -
Run the now modified
generate-regression-tests.shon your machine. -
In the
testdirectory, runmake golden. -
Commit the changes you've made to the script, all updated test files, and all updated golden files to your branch.