crane/checks/nextest.nix
Ivan Petkov 55187a8218
cargoNextest: support withLlvmCov (#560)
* This adds a convenience method of running `nextest` within `cargo
  llvm-cov` without having to wire up the internal details manually
2024-03-22 22:39:45 +00:00

49 lines
1.2 KiB
Nix

{ cargoNextest
, lib
, linkFarmFromDrvs
}:
let
nextestSimple = withLlvmCov: cargoNextest {
inherit withLlvmCov;
src = ./simple;
pname = "nextest-simple${lib.optionalString withLlvmCov "-llvm-cov"}";
cargoArtifacts = null;
};
nextestPartitionsCount = withLlvmCov: cargoNextest {
inherit withLlvmCov;
src = ./simple;
pname = "nextest-partitions-count${lib.optionalString withLlvmCov "-llvm-cov"}";
partitions = 4;
partitionType = "count";
cargoArtifacts = null;
};
nextestPartitionsHash = withLlvmCov: cargoNextest {
inherit withLlvmCov;
src = ./simple;
pname = "nextest-partitions-hash${lib.optionalString withLlvmCov "-llvm-cov"}";
partitions = 4;
partitionType = "hash";
cargoArtifacts = null;
};
nextestProcMacro = withLlvmCov: cargoNextest {
inherit withLlvmCov;
src = ./proc-macro;
pname = "nextest-proc-macro${lib.optionalString withLlvmCov "-llvm-cov"}";
cargoArtifacts = null;
};
in
linkFarmFromDrvs "nextestTests" [
(nextestSimple false)
(nextestSimple true)
(nextestPartitionsCount false)
(nextestPartitionsCount true)
(nextestPartitionsHash false)
#(nextestPartitionsHash true) # not yet supported
(nextestProcMacro false)
(nextestProcMacro true)
]