From 69c96adc53fb7edb909d3682e361f59469b834ef Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Thu, 16 Jan 2020 13:19:50 +0100 Subject: [PATCH] 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. --- .../rust/build-rust-crate/test/default.nix | 15 +++++++++------ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/build-support/rust/build-rust-crate/test/default.nix b/pkgs/build-support/rust/build-rust-crate/test/default.nix index aa20bd03b189..aefa279fc5e9 100644 --- a/pkgs/build-support/rust/build-rust-crate/test/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/test/default.nix @@ -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; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4acd88db2e38..6310d3b30e87 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {