haskell / haskell/cabal

Hspec support request

Open
#9,343 6 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the feature request**
I have a feature request in Hspec to make it easier to run specific tests with Cabal: https://github.com/hspec/hspec/issues/862

Hspec needs to know if it is run by Cabal.

@sol suggests this can be implemented if `cabal test` sets the environment variable `CABAL_TEST_COMMAND=cabal`

**Additional context**

Currently a failing test will print:

```
To rerun use: --match "/someFailingTest/"
```

To use this suggestion with Cabal, it must be modified to this:
```
cabal test --test-options="--match \"/someFailingTest/\""
```

With this environment variable, Hspec will print out this feedback for Cabal.

Contributor guide

Open the contributing guide

Research direction

Start at the `cabal test` entry point and trace how its test processes receive environment variables. Check the linked Hspec issue for the expected behavior. Done means `cabal test` provides `CABAL_TEST_COMMAND=cabal` so Hspec can print a Cabal-specific rerun command.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.