buildRustPackage: Add cargoTestFlags

This makes it possible to pass flags to `cargo test`, which is needed if
a crate is compiled with custom feature flags.
This commit is contained in:
Max Hausch
2021-03-02 09:45:26 +01:00
parent fa62f37160
commit ebe3ae4d4d
2 changed files with 9 additions and 1 deletions
@@ -1,4 +1,5 @@
declare -a checkFlags
declare -a cargoTestFlags
cargoCheckHook() {
echo "Executing cargoCheckHook"
@@ -15,7 +16,7 @@ cargoCheckHook() {
threads=1
fi
argstr="--${cargoCheckType} --target @rustTargetPlatformSpec@ --frozen";
argstr="--${cargoCheckType} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}";
(
set -x