forked from mirrors/nixpkgs
Merge pull request #105379 from NixOS/fix-buildRustCrateTests
tests.buildRustCrate: Fix after hashing method change
This commit is contained in:
commit
86c1825fc1
|
@ -146,12 +146,18 @@ let
|
|||
};
|
||||
in
|
||||
runCommand "assert-outputs-${name}" {
|
||||
} ''
|
||||
} (''
|
||||
local actualFiles=$(mktemp)
|
||||
|
||||
cd "${crateOutput}"
|
||||
find . -type f | sort >$actualFiles
|
||||
diff -q ${expectedFilesFile} $actualFiles >/dev/null || {
|
||||
find . -type f \
|
||||
| sort \
|
||||
''
|
||||
# sed out the hash because it differs per platform
|
||||
+ ''
|
||||
| sed -E -e 's/-[0-9a-fA-F]{10}\.rlib/-HASH.rlib/g' \
|
||||
> "$actualFiles"
|
||||
diff -q ${expectedFilesFile} "$actualFiles" > /dev/null || {
|
||||
echo -e "\033[0;1;31mERROR: Difference in expected output files in ${crateOutput} \033[0m" >&2
|
||||
echo === Got:
|
||||
sed -e 's/^/ /' $actualFiles
|
||||
|
@ -164,7 +170,7 @@ let
|
|||
exit 1
|
||||
}
|
||||
touch $out
|
||||
''
|
||||
'')
|
||||
;
|
||||
|
||||
in rec {
|
||||
|
@ -594,7 +600,7 @@ let
|
|||
};
|
||||
expectedFiles = [
|
||||
"./nix-support/propagated-build-inputs"
|
||||
"./lib/libtest_lib-042a1fdbef.rlib"
|
||||
"./lib/libtest_lib-HASH.rlib"
|
||||
"./lib/link"
|
||||
];
|
||||
};
|
||||
|
@ -611,7 +617,7 @@ let
|
|||
};
|
||||
expectedFiles = [
|
||||
"./nix-support/propagated-build-inputs"
|
||||
"./lib/libtest_lib-042a1fdbef.rlib"
|
||||
"./lib/libtest_lib-HASH.rlib"
|
||||
"./lib/link"
|
||||
];
|
||||
};
|
||||
|
|
|
@ -39,6 +39,7 @@ with pkgs;
|
|||
cross = callPackage ./cross {};
|
||||
|
||||
rustCustomSysroot = callPackage ./rust-sysroot {};
|
||||
buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { };
|
||||
|
||||
nixos-functions = callPackage ./nixos-functions {};
|
||||
|
||||
|
|
|
@ -10071,7 +10071,6 @@ 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 { });
|
||||
cratesIO = callPackage ../build-support/rust/crates-io.nix { };
|
||||
|
||||
cargo-web = callPackage ../development/tools/cargo-web {
|
||||
|
|
Loading…
Reference in a new issue