-
Notifications
You must be signed in to change notification settings - Fork 47
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
directory-1.2.2.0 test suite fails in NixOS #24
Comments
AFAIK, I'm not sure what would be the best way to handle this. Maybe there's a way to do this with a custom |
Doesn't cabal just ignore the tool if it can't find it and prints a warning about it? If not then maybe we have to patch that first.
The practice on |
Just use the following snippet as Setup.hs:
|
It seems to just die when that happens. I would prefer if it just checked if a command named |
Cool, thanks! This seems to work. Is there anything else required besides |
It's hard to tell ...now that
Just for kicks, I tried running out without the network isolation, and then it said:
Basically, accessing the network is a problem in fully automated builds (like we run in NixOS). |
How about if I just put the tests behind a flag and leave it disabled by default? |
We can disable them by default ourselves but the goal is to have the tests run (otherwise they are useless) if possible :) |
Yes, @Fuuzetsu is right. We can disable the tests in Nixpkgs; you don't have to worry about that. It would be great, though, if those tests that work locally could be split from those that require network access. Then we could run the local tests in NixOS, but avoid those that access github.com. If those two kinds of tests were in separate binaries, then this would be quite easy to accomplish in Nix. |
For reference: NixOS/nixpkgs@a4ffd58. Tests are now disabled, and the build succeeds in Nixpkgs. |
The reason why it needs network is to download the GHC repo that contains test suite. Without it no tests can be run. (See this issue.) Perhaps I should just disentangle the test suite and embed it within network? |
Well, we have a fundamental assumption in our build process that downloading the release tarball is enough to build the package. If |
The GHC test suite lives in the source tree of GHC – i.e. it's not an isolated library so I'm not sure how feasible it is to upload it to Hackage (it's not even in Haskell either). |
OK, I've embedded the test framework within the package (Rufflewind@59afb58). While Would you mind checking again on NixOS? |
Looks like I made a paltry attempt to build it on a NixOS VM and the package seems to work now. If there are any more related problems, feel free to reopen this issue. |
Will you make a new release with those fixes? |
Done: v1.2.2.1. |
The test suite for directory-1.2.2.0 depends on
git
, but doesn't declare that dependency in thebuild-tools:
stanza. As a result, NixOS will not include the tool in the build environment, leading to a test suite failure: http://hydra.cryp.to/build/640684/log/raw.The text was updated successfully, but these errors were encountered: