Specify a specific shell to execute cram test commands
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
Desired Behavior
Cram tests (and (system ...) commands) run in the default system shell. It would be useful to be able to specify a specific shell to use instead.
My specific use case is that I want to guarantee portability while writing tests, but I don't want to assume compatibility with my system shell (on MacOS, usually). Being able to automatically use a shell like dash would be an easy way to catch non-portable commands.
Example
I think it would make sense to expose this option as an environment variable or a CLI flag, since the configuration is local and I probably don't want to commit it in a dune file.
DUNE_SHELL=/usr/local/bin/dash dune runtest
or
dune runtest --shell=/usr/local/bin/dash
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Dune runs cram tests and (system ...) commands during dune runtest, including where the default system shell is selected. Compare the proposed environment-variable and CLI-flag approaches. Done means users can select a shell such as dash and both command types execute through it consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml, shell
- Domain
- build-system, cli, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100