-
Notifications
You must be signed in to change notification settings - Fork 44
Testing
JKTKops edited this page Jul 26, 2021
·
9 revisions
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 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/'