tests.buildRustCrate: add rcgen test

rcgen depends on ring, and therefore exercises support for static libraries
main
Ben Wolsieffer 2 years ago committed by Yt
parent a6bbe3f794
commit 882741f632
  1. 14
      pkgs/build-support/rust/build-rust-crate/test/default.nix
  2. 3496
      pkgs/build-support/rust/build-rust-crate/test/rcgen-crates.nix

@ -548,6 +548,10 @@ let
};
};
brotliCrates = (callPackage ./brotli-crates.nix {});
rcgenCrates = callPackage ./rcgen-crates.nix {
# Suppress deprecation warning
buildRustCrate = null;
};
tests = lib.mapAttrs (key: value: mkTest (value // lib.optionalAttrs (!value?crateName) { crateName = key; })) cases;
in tests // rec {
@ -645,6 +649,16 @@ let
} ''
test -e ${pkg}/bin/brotli-decompressor && touch $out
'';
rcgenTest = let
pkg = rcgenCrates.rootCrate.build;
in runCommand "run-rcgen-test-cmd" {
nativeBuildInputs = [ pkg ];
} (if stdenv.hostPlatform == stdenv.buildPlatform then ''
${pkg}/bin/rcgen && touch $out
'' else ''
test -x '${pkg}/bin/rcgen' && touch $out
'');
};
test = releaseTools.aggregate {
name = "buildRustCrate-tests";

Loading…
Cancel
Save