11#! /usr/bin/env bash
22
3- dotnet_sdk_version=" $2 "
4- dotnet_runtime_version=" $3 "
3+ dotnet_runtime_version=" $2 "
54
65RESET=" \033[0m"
76RED=" \033[0;31m"
@@ -11,7 +10,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1110
1211# Ensures every invocation of dotnet apps uses the same dotnet.exe
1312# Add $random to path to ensure tests don't expect dotnet to be in a particular path
14- export DOTNET_ROOT=" $DIR /. dotnet$RANDOM "
13+ export DOTNET_ROOT=" $HELIX_CORRELATION_PAYLOAD / dotnet"
1514
1615# Ensure dotnet comes first on PATH
1716export PATH=" $DOTNET_ROOT :$PATH :$DIR /node/bin"
4746# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs)
4847chmod +x " dotnet-install.sh" ; sync
4948
50- ./dotnet-install.sh --version $dotnet_sdk_version --install-dir " $DOTNET_ROOT "
51- if [ $? -ne 0 ]; then
52- sdk_retries=3
53- while [ $sdk_retries -gt 0 ]; do
54- ./dotnet-install.sh --version $dotnet_sdk_version --install-dir " $DOTNET_ROOT "
55- if [ $? -ne 0 ]; then
56- let sdk_retries=sdk_retries-1
57- echo -e " ${YELLOW} Failed to install .NET Core SDK $version . Retries left: $sdk_retries .${RESET} "
58- else
59- sdk_retries=0
60- fi
61- done
62- fi
63-
6449./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir " $DOTNET_ROOT "
6550if [ $? -ne 0 ]; then
6651 runtime_retries=3
8570# dontet-install.sh seems to affect the Linux filesystem and causes test flakiness unless we sync the filesystem before running tests
8671sync
8772
73+ $DOTNET_ROOT /dotnet --list-sdks
74+ $DOTNET_ROOT /dotnet --list-runtimes
75+
8876exit_code=0
8977echo " Restore: $DOTNET_ROOT /dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources..."
9078$DOTNET_ROOT /dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources
91- echo " Running tests: $DOTNET_ROOT /dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9 -- helixTimeout ${10} ..."
92- $DOTNET_ROOT /dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9 -- helixTimeout ${10}
79+ echo " Running tests: $DOTNET_ROOT /dotnet run --project RunTests/RunTests.csproj -- --target $1 --runtime $2 --queue $3 --arch $4 --quarantined $5 --ef $6 --aspnetruntime $7 --aspnetref $8 --helixTimeout $9 ..."
80+ $DOTNET_ROOT /dotnet run --project RunTests/RunTests.csproj -- --target $1 --runtime $2 --queue $3 --arch $4 --quarantined $5 --ef $6 --aspnetruntime $7 --aspnetref $8 --helixTimeout $9
9381exit_code=$?
9482echo " Finished tests...exit_code=$exit_code "
9583
0 commit comments