Skip to content

Commit 2a8440c

Browse files
committed
Add runtests files
1 parent 253680b commit 2a8440c

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

test/vstest/runtests.cmd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
set target=%1
2+
set sdkVersion=%2
3+
set runtimeVersion=%3
4+
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Version %sdkVersion% -InstallDir %HELIX_CORRELATION_PAYLOAD%\sdk"
5+
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Runtime dotnet -Version %runtimeVersion% -InstallDir %HELIX_CORRELATION_PAYLOAD%\sdk"
6+
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
7+
set DOTNET_ROOT="$HELIX_CORRELATION_PAYLOAD/sdk"
8+
set PATH="$DOTNET_ROOT:$PATH"
9+
set DOTNET_MULTILEVEL_LOOKUP=0
10+
set DOTNET_CLI_HOME="$HELIX_CORRELATION_PAYLOAD/home"
11+
%HELIX_CORRELATION_PAYLOAD%\sdk\dotnet vstest %target% --logger:trx
12+
13+

test/vstest/runtests.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version $2 --no-cdn --install-dir $HELIX_CORRELATION_PAYLOAD/sdk
3+
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --runtime dotnet --version $3 --no-cdn --install-dir $HELIX_CORRELATION_PAYLOAD/sdk
4+
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
5+
6+
# Ensures every invocation of dotnet apps uses the same dotnet.exe
7+
export DOTNET_ROOT="$HELIX_CORRELATION_PAYLOAD/sdk"
8+
9+
# Ensure dotnet comes first on PATH
10+
export PATH="$DOTNET_ROOT:$PATH"
11+
12+
# Prevent fallback to global .NET locations. This ensures our tests use the shared frameworks we specify and don't rollforward to something else that might be installed on the machine
13+
export DOTNET_MULTILEVEL_LOOKUP=0
14+
15+
# Avoid contaminating userprofiles
16+
export DOTNET_CLI_HOME="$HELIX_CORRELATION_PAYLOAD/home"
17+
18+
$HELIX_CORRELATION_PAYLOAD/sdk/dotnet vstest $1 --logger:trx

test/xunit/runtests.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set target=%1
2+
xunit.console.exe %target% -xml testResults.xml

0 commit comments

Comments
 (0)