Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Pass TargetsWindowsArg to wrapper build in build-test.cmd
Browse files Browse the repository at this point in the history
Helix builds tests on windows and runs them on unix using the xunit
wrappers. When cross-building the wrappers like this, TargetsWindows
is set to false by the test build pipeline. This variable ensures that
the wrapper uses correct directory separators when invoking the test
.sh file.
  • Loading branch information
sbomer committed Jul 18, 2018
1 parent e266f30 commit 8e0190d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,13 @@ if defined __RuntimeId (
)

set TargetsWindowsArg=
set TargetsWindowsMsbuildArg=
if "%__TargetsWindows%"=="1" (
set TargetsWindowsArg=-TargetsWindows=true
set TargetsWindowsMsbuildArg=/p:TargetsWindows=true
) else if "%__TargetsWindows%"=="0" (
set TargetsWindowsArg=-TargetsWindows=false
set TargetsWindowsMsbuildArg=/p:TargetsWindows=false
)

echo %__MsgPrefix%Creating test overlay...
Expand Down Expand Up @@ -436,7 +439,7 @@ set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"

REM Build wrappers using the local SDK's msbuild. As we move to arcade, the other builds should be moved away from run.exe as well.
call %__DotnetHost% msbuild %__ProjectDir%\tests\runtest.proj /p:BuildWrappers=true !__msbuildLog! !__msbuildWrn! !__msbuildErr! %__msbuildArgs% %__unprocessedBuildArgs%
call %__DotnetHost% msbuild %__ProjectDir%\tests\runtest.proj /p:BuildWrappers=true !__msbuildLog! !__msbuildWrn! !__msbuildErr! %__msbuildArgs% %TargetsWindowsMsbuildArg% %__unprocessedBuildArgs%
if errorlevel 1 (
echo Xunit Wrapper build failed
exit /b 1
Expand Down

0 comments on commit 8e0190d

Please sign in to comment.