forked from redhat-developer/dotnet-regular-tests
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a check to make sure runtime graphs are complete
We need to make sure Microsoft.NETCore.App.deps.json has at least one runtime fallback graph. Otherwise, it is possible that .NET will fail to find assets placed in the RID-fallback graph. For more details, see dotnet/runtime#78563
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "runtime-fallback-graph", | ||
"enabled": true, | ||
"requiresSdk": false, | ||
"version": "3.1", | ||
"versionSpecific": false, | ||
"type": "bash", | ||
"cleanup": true, | ||
"ignoredRIDs":[ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Check runtime fallback graphs are present in the shared framework | ||
|
||
set -euo pipefail | ||
set -x | ||
|
||
dotnet_dir="$(../dotnet-directory --home "$1")" | ||
|
||
# print for debugging | ||
find "${dotnet_dir}" -iname Microsoft.NETCore.App.deps.json | ||
|
||
while IFS= read -r -d '' file; do | ||
jq '.runtimes' "$file" | ||
length=$(jq '.runtimes | length' "$file") | ||
if [[ $length == 0 ]]; then | ||
echo "Missing .runtimes section in $file" | ||
exit 1 | ||
fi | ||
done < <(find "${dotnet_dir}" -iname Microsoft.NETCore.App.deps.json -print0) |