mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2025-01-06 03:06:58 +03:00
remote: Put tests behind io-testsuite flag
Disabled by default since it requires `nix-daemon` binary and Linux namespaces support. For development this can be enabled by ``` cabal configure --flag=io-testsuite ``` or by adding ``` flags: +io-testsuite ``` to `cabal.project.local` Enabled by `callCabal2nixWithOptions` in `overlay.nix` so it is tested by `nix-build` and `nix-shell` brings all test dependencies. This is fine on NixOS where `build-tool-depends: nix:nix-daemon` works and we have namespaces supported.
This commit is contained in:
parent
850bafdb84
commit
dff752750d
@ -13,6 +13,13 @@ build-type: Simple
|
||||
extra-source-files: ChangeLog.md, README.md
|
||||
cabal-version: >=1.10
|
||||
|
||||
flag io-testsuite
|
||||
default:
|
||||
False
|
||||
description:
|
||||
Enable testsuite, which requires external
|
||||
binaries and Linux namespace support.
|
||||
|
||||
library
|
||||
exposed-modules: System.Nix.Store.Remote
|
||||
, System.Nix.Store.Remote.Binary
|
||||
@ -45,6 +52,11 @@ library
|
||||
ghc-options: -Wall
|
||||
|
||||
test-suite hnix-store-remote-tests
|
||||
if !flag(io-testsuite)
|
||||
buildable: False
|
||||
|
||||
build-tool-depends: nix:nix-daemon
|
||||
|
||||
ghc-options: -rtsopts -fprof-auto
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Driver.hs
|
||||
|
@ -2,5 +2,5 @@ huper: helf: {
|
||||
hnix-store-core =
|
||||
helf.callCabal2nix "hnix-store-core" ./hnix-store-core {};
|
||||
hnix-store-remote =
|
||||
helf.callCabal2nix "hnix-store-remote" ./hnix-store-remote {};
|
||||
helf.callCabal2nixWithOptions "hnix-store-remote" ./hnix-store-remote "-fio-testsuite" {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user