diff options
author | Thomas Mühlbacher <tmuehlbacher@posteo.net> | 2024-05-28 19:04:47 +0200 |
---|---|---|
committer | Thomas Mühlbacher <tmuehlbacher@posteo.net> | 2024-05-28 19:32:53 +0200 |
commit | b362f12add2b7307cf404ead3b0c4fc75b43422e (patch) | |
tree | 9fe8c7b9b6f2ad4eac5e0255950ccab60348f5fe | |
parent | 422ae1f1a70c5c97bd26756d0f61ad011ccea87f (diff) |
build(nix): add `cargo test` check
this is pretty much a no-op currently, but hopefully we can make some
use of it in the future.
-rw-r--r-- | flake.nix | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -139,6 +139,24 @@ } ); + # we have to build our own `craneLib.cargoTest` + checks.cargo-test = craneLib.mkCargoDerivation ( + commonArgs + // { + inherit cargoArtifacts; + doCheck = true; + + enableParallelChecking = true; + + pnameSuffix = "-test"; + buildPhaseCargoCommand = ""; + checkPhaseCargoCommand = '' + make ''${enableParallelChecking:+-j''${NIX_BUILD_CORES}} $makeFlags libbcachefs.a + cargo test --profile release -- --nocapture + ''; + } + ); + devShells.default = pkgs.mkShell { inputsFrom = [ config.packages.default |