Helix tests should fail if exceptions thrown during test discovery (#8107)
This commit is contained in:
parent
51e30ee20d
commit
3652b7a927
|
|
@ -15,6 +15,14 @@ powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePo
|
||||||
|
|
||||||
set HELIX=true
|
set HELIX=true
|
||||||
|
|
||||||
|
%DOTNET_ROOT%\dotnet vstest %target% -lt >discovered.txt
|
||||||
|
find /c "Exception thrown" discovered.txt
|
||||||
|
if %errorlevel% equ 0 (
|
||||||
|
echo Exception thrown during test discovery.
|
||||||
|
type discovered.txt
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
|
||||||
%DOTNET_ROOT%\dotnet vstest %target% --logger:trx --logger:console;verbosity=normal
|
%DOTNET_ROOT%\dotnet vstest %target% --logger:trx --logger:console;verbosity=normal
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,4 +60,11 @@ export DOTNET_CLI_HOME="$HELIX_CORRELATION_PAYLOAD/home"
|
||||||
|
|
||||||
export helix="true"
|
export helix="true"
|
||||||
|
|
||||||
$HELIX_CORRELATION_PAYLOAD/sdk/dotnet vstest $1 --logger:trx
|
$DOTNET_ROOT/dotnet vstest $1 -lt >discovered.txt
|
||||||
|
if grep -q "Exception thrown" discovered.txt; then
|
||||||
|
echo -e "${RED}Exception thrown during test discovery${RESET}".
|
||||||
|
cat discovered.txt
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
$DOTNET_ROOT/dotnet vstest $1 --logger:trx
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue