From 0e2af2a25f02f57b589141cc7028fcbe2248fea8 Mon Sep 17 00:00:00 2001 From: Paul Brinkmeier Date: Fri, 11 Oct 2024 11:18:47 +0200 Subject: [PATCH 1/3] Add text about running just plugin tests and using TASTY_PATTERN --- docs/contributing/contributing.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/contributing/contributing.md b/docs/contributing/contributing.md index c38ce0421d..049c7a7b9f 100644 --- a/docs/contributing/contributing.md +++ b/docs/contributing/contributing.md @@ -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-tests +# E.g. +$ cabal test hls-refactor-plugin-tests +``` + Running a subset of tests Tasty supports providing @@ -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. From 4cc51d38ae41725b2e00f317ef327ac62a20156c Mon Sep 17 00:00:00 2001 From: Paul Brinkmeier Date: Fri, 11 Oct 2024 11:29:35 +0200 Subject: [PATCH 2/3] fixup! Add text about running just plugin tests and using TASTY_PATTERN --- docs/contributing/contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing/contributing.md b/docs/contributing/contributing.md index 049c7a7b9f..6f264de96e 100644 --- a/docs/contributing/contributing.md +++ b/docs/contributing/contributing.md @@ -111,7 +111,7 @@ Yet another way to pass the pattern without recompilation is to use the `TASTY_P 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 +$ TASTY_PATTERN='hlint' cabal test func-test ``` ## Using HLS on HLS code From 6c4189c31ec4006eac13d691fe6c2b7e0c07edd6 Mon Sep 17 00:00:00 2001 From: Paul Brinkmeier Date: Fri, 11 Oct 2024 14:42:12 +0200 Subject: [PATCH 3/3] Remove docs for passing tasty pattern using cabal run --- docs/contributing/contributing.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/contributing/contributing.md b/docs/contributing/contributing.md index 6f264de96e..5d01154d8c 100644 --- a/docs/contributing/contributing.md +++ b/docs/contributing/contributing.md @@ -100,15 +100,7 @@ $ cabal test func-test --test-option "-p hlint" ``` The above recompiles everything every time you use a different test option though. - -An alternative, which only recompiles when tests (or dependencies) change: - -```bash -$ 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.: +An alternative, which only recompiles when tests (or dependencies) change is to pass the `TASTY_PATTERN` environment variable: ```bash $ TASTY_PATTERN='hlint' cabal test func-test