buildRustCrateTests: use releaseTools.aggregate

Previously I did use `runCommand` to do the same. Using
releaseTools.aggregate seems a lot saner and we might get nicer hydra
output of the tests that are failing.
This commit is contained in:
Andreas Rammhold 2020-01-16 13:19:50 +01:00
parent 29a8575e3d
commit 69c96adc53
No known key found for this signature in database
GPG Key ID: E432E410B5E48C86
2 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,4 @@
{ lib, buildRustCrate, runCommand, writeTextFile, symlinkJoin, callPackage }:
{ lib, buildRustCrate, runCommand, writeTextFile, symlinkJoin, callPackage, releaseTools }:
let
mkCrate = args: let
p = {
@ -211,9 +211,12 @@ let
test -e ${pkg}/bin/brotli-decompressor && touch $out
'';
};
test = runCommand "run-buildRustCrate-tests" {
nativeBuildInputs = builtins.attrValues tests;
} "
touch $out
";
test = releaseTools.aggregate {
name = "buildRustCrate-tests";
meta = {
description = "Test cases for buildRustCrate";
maintainers = [ lib.maintainers.andir ];
};
constituents = builtins.attrValues tests;
};
}

View File

@ -8714,7 +8714,7 @@ in
buildRustCrate = callPackage ../build-support/rust/build-rust-crate { };
buildRustCrateHelpers = callPackage ../build-support/rust/build-rust-crate/helpers.nix { };
buildRustCrateTests = recurseIntoAttrs (callPackage ../build-support/rust/build-rust-crate/test { }).tests;
buildRustCrateTests = recurseIntoAttrs (callPackage ../build-support/rust/build-rust-crate/test { });
cratesIO = callPackage ../build-support/rust/crates-io.nix { };
cargo-web = callPackage ../development/tools/cargo-web {