-
Notifications
You must be signed in to change notification settings - Fork 45
Testing
Georgy Lukyanov edited this page Jul 23, 2021
·
9 revisions
To execute integration tests only from one subfolder of test/, run from project root:
make -C "test/issue-2700" test
Run unit tests that match an awk pattern:
stack test --test-arguments '-p "$(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/'