Skip to content
代码片段 群组 项目
未验证 提交 f5a22459 编辑于 作者: Brennan's avatar Brennan 提交者: GitHub
浏览文件

Use xunit.runner.json in Helix runs (#19922)

上级 4f5dbca3
No related branches found
No related tags found
无相关合并请求
{
"longRunningTestSeconds": 60,
"diagnosticMessages": true,
"maxParallelThreads": -1
}
......@@ -27,13 +27,13 @@ echo "Checking for Microsoft.AspNetCore.App"
if EXIST ".\Microsoft.AspNetCore.App" (
echo "Found Microsoft.AspNetCore.App, copying to %DOTNET_ROOT%\shared\Microsoft.AspNetCore.App\%runtimeVersion%"
xcopy /i /y ".\Microsoft.AspNetCore.App" %DOTNET_ROOT%\shared\Microsoft.AspNetCore.App\%runtimeVersion%\
echo "Adding current directory to nuget sources: %HELIX_WORKITEM_ROOT%"
dotnet nuget add source %HELIX_WORKITEM_ROOT%
dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
dotnet nuget list source
dotnet tool install dotnet-ef --global --version %$efVersion%
set PATH=!PATH!;%DOTNET_CLI_HOME%\.dotnet\tools
)
......@@ -49,6 +49,11 @@ echo Creating nuget restore directory: %NUGET_RESTORE%
mkdir %NUGET_RESTORE%
mkdir logs
REM "Rename default.runner.json to xunit.runner.json if there is not a custom one from the project"
if not EXIST ".\xunit.runner.json" (
copy default.runner.json xunit.runner.json
)
dir
%DOTNET_ROOT%\dotnet vstest %$target% -lt >discovered.txt
......
......@@ -98,17 +98,22 @@ if [ -d "Microsoft.AspNetCore.App" ]
then
echo "Found Microsoft.AspNetCore.App directory, copying to $DOTNET_ROOT/shared/Microsoft.AspNetCore.App/$dotnet_runtime_version."
cp -r Microsoft.AspNetCore.App $DOTNET_ROOT/shared/Microsoft.AspNetCore.App/$dotnet_runtime_version
echo "Adding current directory to nuget sources: $DIR"
dotnet nuget add source $DIR
dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
dotnet nuget list source
dotnet tool install dotnet-ef --global --version $efVersion
# Ensure tools are on on PATH
export PATH="$PATH:$DOTNET_CLI_HOME/.dotnet/tools"
fi
# Rename default.runner.json to xunit.runner.json if there is not a custom one from the project
if [ ! -f "xunit.runner.json" ]
then
cp default.runner.json xunit.runner.json
fi
if [ -e /proc/self/coredump_filter ]; then
......
......@@ -8,4 +8,10 @@
</PropertyGroup>
<Import Project="TemplateProjects.props" Condition="'$(IsTestProject)' != 'true' AND '$(IsTestAssetProject)' != 'true'" />
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<Content Include="$(MSBuildThisFileDirectory)xunit.runner.json" Link="xunit.runner.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
{
"longRunningTestSeconds": 60,
"diagnosticMessages": true,
"maxParallelThreads": -1
}
......@@ -2,4 +2,4 @@
"longRunningTestSeconds": 30,
"diagnosticMessages": true,
"maxParallelThreads": -1
}
}
\ No newline at end of file
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册