-
Notifications
You must be signed in to change notification settings - Fork 710
How to install library with tests #9444
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
Comments
I think you can't. I'm not sure why. Perhaps because tests are permitted to assume they are run in a checked in repo, with data files at the repo location, not the installed location, etc. I imagine Or, if the test is self-contained, standalone and user-facing, perhaps turn it into an executable component, for the user to install and run. |
Actually, don't install, just run ( BTW, the commandline you provided won't install the library. It's only used to install executables. You probably want |
Do you want to run the tests during the install process or also install the test executables? |
I want to make sure I run the tests. Ideally, I'd like to do what used to happen with: $ cabal v1-install --enable-tests --only-dependencies
$ cabal v1-test |
I think this would need to be a feature request for v2-install that it have a flag to run test-suites as part of installation -- I don't see another way for this to work exactly as desired. note that even in v1-install this didn't actually occur -- rather, the tests would get run on the downloaded package and entirely independently the package would get installed -- it would just so happen that produced binary artifacts would be reused between the two. the equivalent in v2 is what mikolaj suggested -- |
Relevant prior discussion: |
Running
|
right. copilot-libraries doesn't have any tests. its also a library and not an executable. is the ask that i can |
I'm an idiot and you're right. I meant to try |
I'm using GHC 9.4.8 and cabal 3.8.
I'm trying to install
copilot-language-3.17
from hackage with tests.The obvious way
cabal install copilot-language --enable-tests
results in an error message:Error: cabal: --enable-tests was specified, but tests can't be enabled in a remote package
What is currently the way to install a package with tests enabled?
The text was updated successfully, but these errors were encountered: