File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,25 @@ public static int Main(string[] args)
26
26
BeforeTestRun ( newArgs ) ;
27
27
}
28
28
29
- int returnCode ;
29
+ int returnCode = 0 ;
30
30
31
31
if ( testCommandLine . ShowSdkInfo )
32
32
{
33
33
returnCode = ShowSdkInfo ( ) ;
34
34
}
35
35
else
36
36
{
37
- returnCode = Xunit . ConsoleClient . Program . Main ( newArgs . ToArray ( ) ) ;
37
+ var xunitReturnCode = Xunit . ConsoleClient . Program . Main ( newArgs . ToArray ( ) ) ;
38
+ if ( Environment . GetEnvironmentVariable ( "HELIX_WORKITEM_PAYLOAD" ) != null )
39
+ {
40
+ // If we are running in Helix, we want the test work item to return 0 unless there's a crash
41
+ Console . WriteLine ( $ "Xunit return code: { xunitReturnCode } ") ;
42
+ }
43
+ else
44
+ {
45
+ // If we are running locally, we to return the xunit return code
46
+ returnCode = xunitReturnCode ;
47
+ }
38
48
}
39
49
40
50
if ( testCommandLine . ShouldShowHelp )
You can’t perform that action at this time.
0 commit comments