Skip to content

Commit

Permalink
Add text about running just plugin tests and using TASTY_PATTERN
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrinkmeier committed Oct 11, 2024
1 parent 87b4d95 commit 0e2af2a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/contributing/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ Running just the wrapper tests
$ cabal test wrapper-test
```

Running just the tests for a specific plugin

```bash
$ cabal test hls-<plugin-name>-plugin-tests
# E.g.
$ cabal test hls-refactor-plugin-tests
```

Running a subset of tests

Tasty supports providing
Expand All @@ -99,6 +107,13 @@ An alternative, which only recompiles when tests (or dependencies) change:
$ cabal run haskell-language-server:func-test -- -p "hlint enables"
```

Yet another way to pass the pattern without recompilation is to use the `TASTY_PATTERN` environment variable.
Run any of the `cabal test` commands above and set it to your pattern, e.g.:

```bash
$ TASTY_PATTERN='-p hlint' cabal test func-test
```

## Using HLS on HLS code

Refer to the [HLS project configuration guidelines](../configuration.md#configuring-your-project-build) as they also apply to the HLS project itself.
Expand Down

0 comments on commit 0e2af2a

Please sign in to comment.