3
0
Fork 0
forked from mirrors/nixpkgs

buildDotnetModule: proper escaping of disabledTests

This commit is contained in:
mdarocha 2022-12-29 22:39:28 +01:00
parent 9b04b1d98b
commit 08e378f0d4
2 changed files with 6 additions and 2 deletions

View file

@ -43,7 +43,11 @@ in
substitutions = {
inherit buildType libraryPath;
disabledTests = lib.optionalString (disabledTests != [])
(lib.concatStringsSep "&FullyQualifiedName!=" disabledTests);
(let
escapedNames = lib.lists.map (n: lib.replaceStrings [","] ["%2C"] n) disabledTests;
filters = lib.lists.map (n: "FullyQualifiedName!=${n}") escapedNames;
in
"${lib.concatStringsSep "&" filters}");
};
} ./dotnet-check-hook.sh) { };

View file

@ -7,7 +7,7 @@ dotnetCheckHook() {
runHook preCheck
if [ "${disabledTests-}" ]; then
local -r disabledTestsFlag="--filter FullyQualifiedName!=@disabledTests@"
local -r disabledTestsFlag="--filter @disabledTests@"
fi
if [ "${enableParallelBuilding-}" ]; then