3
0
Fork 0
forked from mirrors/nixpkgs

tests.buildRustCrate: add rcgen test

rcgen depends on ring, and therefore exercises support for static libraries
This commit is contained in:
Ben Wolsieffer 2022-06-12 14:28:38 -04:00 committed by Yt
parent a6bbe3f794
commit 882741f632
2 changed files with 3510 additions and 0 deletions

View file

@ -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";

File diff suppressed because it is too large Load diff