1 # shellcheck shell=bash disable=SC2154,SC2164
4 echo "Executing cargoNextestHook"
8 if [[ -n "${buildAndTestSubdir-}" ]]; then
9 pushd "${buildAndTestSubdir}"
13 "--target" "@rustHostPlatformSpec@"
17 if [[ -z ${dontUseCargoParallelTests-} ]]; then
18 flagsArray
+=("-j" "$NIX_BUILD_CORES")
20 flagsArray
+=("-j" "1")
23 if [ "${cargoCheckType}" != "debug" ]; then
24 flagsArray
+=("--cargo-profile" "${cargoCheckType}")
27 if [ -n "${cargoCheckNoDefaultFeatures-}" ]; then
28 flagsArray
+=("--no-default-features")
31 if [ -n "${cargoCheckFeatures-}" ]; then
32 flagsArray
+=("--features=$(concatStringsSep "," cargoCheckFeatures)")
35 prependToVar checkFlags
"--"
36 concatTo flagsArray cargoTestFlags checkFlags checkFlagsArray
38 echoCmd
'cargoNextestHook flags' "${flagsArray[@]}"
39 cargo nextest run
"${flagsArray[@]}"
41 if [[ -n "${buildAndTestSubdir-}" ]]; then
45 echo "Finished cargoNextestHook"
50 if [ -z "${dontCargoCheck-}" ] && [ -z "${checkPhase-}" ]; then
51 checkPhase
=cargoNextestHook