2022-04-25 18:58:19 +02:00
|
|
|
# inherit arguments from derivation
|
|
|
|
dotnetTestFlags=( ${dotnetTestFlags[@]-} )
|
2022-01-13 07:39:44 +01:00
|
|
|
|
|
|
|
dotnetCheckHook() {
|
|
|
|
echo "Executing dotnetCheckHook"
|
|
|
|
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
if [ "${disabledTests-}" ]; then
|
2022-12-29 22:39:28 +01:00
|
|
|
local -r disabledTestsFlag="--filter @disabledTests@"
|
2022-01-13 07:39:44 +01:00
|
|
|
fi
|
|
|
|
|
2022-09-09 00:00:49 +02:00
|
|
|
if [ "${enableParallelBuilding-}" ]; then
|
|
|
|
local -r maxCpuFlag="$NIX_BUILD_CORES"
|
|
|
|
else
|
|
|
|
local -r maxCpuFlag="1"
|
|
|
|
fi
|
|
|
|
|
2022-09-16 21:43:44 +02:00
|
|
|
for project in ${testProjectFile[@]-${projectFile[@]}}; do
|
2022-06-28 22:47:20 +02:00
|
|
|
env "LD_LIBRARY_PATH=@libraryPath@" \
|
2022-01-13 07:39:44 +01:00
|
|
|
dotnet test "$project" \
|
|
|
|
-maxcpucount:$maxCpuFlag \
|
|
|
|
-p:ContinuousIntegrationBuild=true \
|
|
|
|
-p:Deterministic=true \
|
|
|
|
--configuration "@buildType@" \
|
|
|
|
--no-build \
|
|
|
|
--logger "console;verbosity=normal" \
|
|
|
|
${disabledTestsFlag-} \
|
|
|
|
"${dotnetTestFlags[@]}" \
|
|
|
|
"${dotnetFlags[@]}"
|
|
|
|
done
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
|
|
|
|
echo "Finished dotnetCheckHook"
|
|
|
|
}
|
|
|
|
|
|
|
|
if [[ -z "${dontDotnetCheck-}" && -z "${checkPhase-}" ]]; then
|
|
|
|
checkPhase=dotnetCheckHook
|
|
|
|
fi
|