File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ REM only puts the explicit filter traits the user provided in
44
44
REM Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
45
45
set NONFLAKY_FILTER = " Flaky:All!=true&Flaky:Helix:All ! =true&Flaky:Helix:Queue:All!=true&Flaky:Helix:Queue: %HELIX% ! =true"
46
46
echo Running non-flaky tests.
47
- %DOTNET_ROOT% \dotnet vstest %target% --logger:trx --TestCaseFilter:%NONFLAKY_FILTER%
47
+ %DOTNET_ROOT% \dotnet vstest %target% --logger:xunit --TestCaseFilter:%NONFLAKY_FILTER%
48
48
if errorlevel 1 (
49
49
echo Failure in non-flaky test 1 >& 2
50
50
set exit_code = 1
@@ -59,5 +59,8 @@ if errorlevel 1 (
59
59
REM DO NOT EXIT and DO NOT SET EXIT_CODE to 1
60
60
)
61
61
62
+ echo " Copying TestResults\TestResults.xml to ."
63
+ copy TestResults\TestResults.xml testResults.xml
64
+
62
65
exit /b %exit_code%
63
66
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
30
30
# Used by SkipOnHelix attribute
31
31
export helix=" $helix_queue_name "
32
32
33
-
34
33
RESET=" \033[0m"
35
34
RED=" \033[0;31m"
36
35
YELLOW=" \033[0;33m"
94
93
# Filter syntax: https://github.com/Microsoft/vstest-docs/blob/master/docs/filter.md
95
94
NONFLAKY_FILTER=" Flaky:All!=true&Flaky:Helix:All!=true&Flaky:Helix:Queue:All!=true&Flaky:Helix:Queue:$helix_queue_name !=true"
96
95
echo " Running non-flaky tests."
97
- $DOTNET_ROOT /dotnet vstest $test_binary_path --logger:trx --TestCaseFilter:" $NONFLAKY_FILTER "
96
+ $DOTNET_ROOT /dotnet vstest $test_binary_path --logger:xunit --TestCaseFilter:" $NONFLAKY_FILTER "
98
97
nonflaky_exitcode=$?
99
98
if [ $nonflaky_exitcode != 0 ]; then
100
99
echo " Non-flaky tests failed!" 1>&2
@@ -109,6 +108,8 @@ if [ $? != 0 ]; then
109
108
# DO NOT EXIT
110
109
fi
111
110
111
+ echo " Copying TestResults/TestResults to ."
112
+ cp TestResults/TestResults.xml testResults.xml
112
113
echo " Copying artifacts/logs to $HELIX_WORKITEM_UPLOAD_ROOT /../"
113
114
shopt -s globstar
114
115
cp artifacts/log/** /* .log $HELIX_WORKITEM_UPLOAD_ROOT /../
Original file line number Diff line number Diff line change 1
1
<Project >
2
2
3
3
<!-- Item group has to be defined here becasue Helix.props is evaluated before xunit.runner.console.props -->
4
- <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETFramework'" >
5
- <HelixContent Condition =" '$(XunitConsole472Path)' != ''" Include =" $([System.IO.Path]::GetDirectoryName('$(XunitConsole472Path)'))/**/*" />
6
- </ItemGroup >
7
-
8
- <ItemGroup >
4
+ <ItemGroup Condition =" $(BuildHelixPayload)" >
9
5
<Content Include =" @(HelixContent)" />
10
6
</ItemGroup >
11
-
7
+
12
8
<!--
13
9
14
10
This target is meant to be used when invoking helix tests on one project at a time.
@@ -35,6 +31,10 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
35
31
</MSBuild >
36
32
</Target >
37
33
34
+ <ItemGroup >
35
+ <PackageReference Include =" XunitXml.TestLogger" Version =" 2.1.26" />
36
+ </ItemGroup >
37
+
38
38
<Target Name =" _SetCreateHelixPayload" >
39
39
<PropertyGroup >
40
40
<_SelectedPlatforms >@(HelixProjectPlatform)</_SelectedPlatforms >
@@ -60,6 +60,11 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
60
60
61
61
<Target Name =" _CreateHelixWorkItem" Condition =" $(BuildHelixPayload)" >
62
62
63
+ <ItemGroup >
64
+ <HelixContent Include =" $(OutputPath)/Microsoft.VisualStudio.TestPlatform.Extension.Xunit.Xml.TestAdapter.dll" />
65
+ <HelixContent Include =" $(OutputPath)/Microsoft.VisualStudio.TestPlatform.Extension.Xunit.Xml.TestLogger.dll" />
66
+ </ItemGroup >
67
+
63
68
<PropertyGroup >
64
69
<!-- Extract the effective queue name from this format "(name)host@dockerimage". This is sometimes used in test code to skip tests. -->
65
70
<_HelixFriendlyNameTargetQueue >$(HelixTargetQueue)</_HelixFriendlyNameTargetQueue >
You can’t perform that action at this time.
0 commit comments