Skip to content

Commit 8e0190d

Browse files
committed
Pass TargetsWindowsArg to wrapper build in build-test.cmd
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.
1 parent e266f30 commit 8e0190d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build-test.cmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,13 @@ if defined __RuntimeId (
376376
)
377377

378378
set TargetsWindowsArg=
379+
set TargetsWindowsMsbuildArg=
379380
if "%__TargetsWindows%"=="1" (
380381
set TargetsWindowsArg=-TargetsWindows=true
382+
set TargetsWindowsMsbuildArg=/p:TargetsWindows=true
381383
) else if "%__TargetsWindows%"=="0" (
382384
set TargetsWindowsArg=-TargetsWindows=false
385+
set TargetsWindowsMsbuildArg=/p:TargetsWindows=false
383386
)
384387

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

438441
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.
439-
call %__DotnetHost% msbuild %__ProjectDir%\tests\runtest.proj /p:BuildWrappers=true !__msbuildLog! !__msbuildWrn! !__msbuildErr! %__msbuildArgs% %__unprocessedBuildArgs%
442+
call %__DotnetHost% msbuild %__ProjectDir%\tests\runtest.proj /p:BuildWrappers=true !__msbuildLog! !__msbuildWrn! !__msbuildErr! %__msbuildArgs% %TargetsWindowsMsbuildArg% %__unprocessedBuildArgs%
440443
if errorlevel 1 (
441444
echo Xunit Wrapper build failed
442445
exit /b 1

0 commit comments

Comments
 (0)