diff --git a/runtime-fallback-graph/test.json b/runtime-fallback-graph/test.json new file mode 100644 index 0000000..50a3669 --- /dev/null +++ b/runtime-fallback-graph/test.json @@ -0,0 +1,11 @@ +{ + "name": "runtime-fallback-graph", + "enabled": true, + "requiresSdk": false, + "version": "3.1", + "versionSpecific": false, + "type": "bash", + "cleanup": true, + "ignoredRIDs":[ + ] +} diff --git a/runtime-fallback-graph/test.sh b/runtime-fallback-graph/test.sh new file mode 100755 index 0000000..f98ea52 --- /dev/null +++ b/runtime-fallback-graph/test.sh @@ -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)