mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-27 02:52:02 +03:00
Conditionally gate nextest tests with multiple partitions
This commit is contained in:
parent
3c65d924ec
commit
52568d052b
@ -104,6 +104,8 @@ myPkgs // {
|
|||||||
|
|
||||||
mkDummySrcTests = callPackage ./mkDummySrcTests { };
|
mkDummySrcTests = callPackage ./mkDummySrcTests { };
|
||||||
|
|
||||||
|
nextest = callPackage ./nextest.nix { };
|
||||||
|
|
||||||
simple = myLib.buildPackage {
|
simple = myLib.buildPackage {
|
||||||
src = ./simple;
|
src = ./simple;
|
||||||
};
|
};
|
||||||
@ -189,27 +191,5 @@ myPkgs // {
|
|||||||
src = ./workspace-git;
|
src = ./workspace-git;
|
||||||
pname = "workspace-git";
|
pname = "workspace-git";
|
||||||
};
|
};
|
||||||
|
|
||||||
nextestSimple = myLib.cargoNextest {
|
|
||||||
src = ./simple;
|
|
||||||
pname = "nextest-simple";
|
|
||||||
cargoArtifacts = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
nextestPartitionsCount = myLib.cargoNextest {
|
|
||||||
src = ./simple;
|
|
||||||
pname = "nextest-partitions-count";
|
|
||||||
partitions = 4;
|
|
||||||
partitionType = "count";
|
|
||||||
cargoArtifacts = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
nextestPartitionsHash = myLib.cargoNextest {
|
|
||||||
src = ./simple;
|
|
||||||
pname = "nextest-partitions-hash";
|
|
||||||
partitions = 4;
|
|
||||||
partitionType = "hash";
|
|
||||||
cargoArtifacts = null;
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
43
checks/nextest.nix
Normal file
43
checks/nextest.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{ cargo-nextest
|
||||||
|
, cargoNextest
|
||||||
|
, lib
|
||||||
|
, linkFarmFromDrvs
|
||||||
|
, runCommand
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
# cargo-nextest version in the stable-22.05 branch is too old
|
||||||
|
nextestSupportsArchives = lib.versionAtLeast
|
||||||
|
cargo-nextest.version
|
||||||
|
"0.9.15";
|
||||||
|
|
||||||
|
nextestSimple = cargoNextest {
|
||||||
|
src = ./simple;
|
||||||
|
pname = "nextest-simple";
|
||||||
|
cargoArtifacts = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
nextestPartitionsCount = cargoNextest {
|
||||||
|
src = ./simple;
|
||||||
|
pname = "nextest-partitions-count";
|
||||||
|
partitions = 4;
|
||||||
|
partitionType = "count";
|
||||||
|
cargoArtifacts = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
nextestPartitionsHash = cargoNextest {
|
||||||
|
src = ./simple;
|
||||||
|
pname = "nextest-partitions-hash";
|
||||||
|
partitions = 4;
|
||||||
|
partitionType = "hash";
|
||||||
|
cargoArtifacts = null;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
runCommand "nextestTests" {
|
||||||
|
buildInputs = [ nextestSimple ] ++ (lib.optionals nextestSupportsArchives [
|
||||||
|
nextestPartitionsCount
|
||||||
|
nextestPartitionsHash
|
||||||
|
]);
|
||||||
|
} ''
|
||||||
|
mkdir -p $out
|
||||||
|
''
|
Loading…
Reference in New Issue
Block a user