diff options
author | Sejong OH <sejooh@microsoft.com> | 2016-03-30 18:23:15 -0700 |
---|---|---|
committer | Sejong Oh <sejooh@microsoft.com> | 2016-03-31 02:22:21 -0700 |
commit | 7bbd985be6eb703a2e6f3822acae68c7305dd325 (patch) | |
tree | adcf56611dcb3d4ba122f9c0ab0e75328ebc6870 /tests/setup-runtime-dependencies.sh | |
parent | d3502c29c511292d0c6046b1aafe87295d2372d9 (diff) | |
download | coreclr-7bbd985be6eb703a2e6f3822acae68c7305dd325.tar.gz coreclr-7bbd985be6eb703a2e6f3822acae68c7305dd325.tar.bz2 coreclr-7bbd985be6eb703a2e6f3822acae68c7305dd325.zip |
Fix tests/setup-runtime-dependencies.sh as per dotnet cli changes
Diffstat (limited to 'tests/setup-runtime-dependencies.sh')
-rwxr-xr-x | tests/setup-runtime-dependencies.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/setup-runtime-dependencies.sh b/tests/setup-runtime-dependencies.sh index 17fbb16334..457636cdc2 100755 --- a/tests/setup-runtime-dependencies.sh +++ b/tests/setup-runtime-dependencies.sh @@ -87,7 +87,7 @@ fi # This script must be located in coreclr/tests. scriptDir=$(cd "$(dirname "$0")"; pwd -P) dotnetToolsDir=$scriptDir/../Tools -dotnetCmd=${dotnetToolsDir}/dotnetcli/bin/dotnet +dotnetCmd=${dotnetToolsDir}/dotnetcli/dotnet packageDir=${scriptDir}/../packages jsonFilePath=${tmpDirPath}/project.json @@ -109,10 +109,17 @@ if [ ! -e $libInstallDir ]; then mkdir -p $libInstallDir fi +# Query runtime Id +rid=`$dotnetCmd --info | grep 'RID:' | sed 's/^ *RID: *//g'` +if [ -z "$rid" ]; then + exit_with_error 1 "Failed to query runtime Id" +fi + # Write dependency information to project.json +packageName='runtime.'$rid'.Microsoft.NETCore.CoreDisTools' echo { \ \"dependencies\": { \ - \"Microsoft.NETCore.CoreDisTools\": \"1.0.0-prerelease-00001\" \ + \"$packageName\": \"1.0.0-prerelease-00001\" \ }, \ \"frameworks\": { \"dnxcore50\": { } } \ } > $jsonFilePath @@ -126,7 +133,7 @@ then fi # Get library path -libPath=`find $packageDir | grep -m 1 libcoredistools` +libPath=`find $packageDir | grep $rid | grep -m 1 libcoredistools` if [ ! -e $libPath ]; then exit_with_error 1 'Failed to locate the downloaded library' fi |