New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set default run #8547
Comments
I don't want to disable tests, I want to execute tests when I type cabal test and execute the executable when I type cabal run |
Hello Pedro, can you tell us why |
I can answer this - because (a) one might not remember what exact names executables in the project have, (b) for a simple project (one "target" exe, one "test" exe) it's I can envision difficulties with projects that build several executables (and/or several test-binaries). |
for (b), cabal is doing the right thing already, am I wrong?
(a) I am not really sure. If you do not remember the name it is because there are multiple executables, and if there are multiple executables you should specify one. |
Alas, no. For (a), the name of a sole executable could be <project_name>, or <project_name-exe>, or something altogether different. While looking it up should be as simple as browsing the <project_name>.cabal file (or doing Fur (b), we claim that the "right thing to do" when only one executable was built, would be to execute it upon command It's a small thing. |
I have a test-suite and an executable, and I want to automatically run the executable when I type cabal run. However, it says that the run command is for running a single executable at once (since it doesn't know whether to run the test or the exe). How do I make cabal ignore test suites when executing cabal run?
The text was updated successfully, but these errors were encountered: