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

Commit 6ebf1fe

Browse files
committed
Add test list CL switch
1 parent 0c6ffa6 commit 6ebf1fe

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

tests/runtest.cmd

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ if /i "%1" == "ilasmroundtrip" (set __IlasmRoundTrip=1&shift&goto Arg_Loo
8080
if /i "%1" == "GenerateLayoutOnly" (set __GenerateLayoutOnly=1&shift&goto Arg_Loop)
8181
if /i "%1" == "PerfTests" (set __PerfTests=true&shift&goto Arg_Loop)
8282
if /i "%1" == "CoreFXTests" (set __CoreFXTests=true&shift&goto Arg_Loop)
83+
if /i "%1" == "CoreFXTestList" (set __CoreFXTests=true&set _CoreFXTestList=%2&shift&shift&goto Arg_Loop)
8384
if /i "%1" == "runcrossgentests" (set RunCrossGen=true&shift&goto Arg_Loop)
8485
if /i "%1" == "link" (set DoLink=true&set ILLINK=%2&shift&shift&goto Arg_Loop)
8586
if /i "%1" == "tieredcompilation" (set COMPLUS_TieredCompilation=1&shift&goto Arg_Loop)
@@ -109,13 +110,19 @@ shift
109110
if defined __TestEnv (if not exist %__TestEnv% echo %__MsgPrefix%Error: Test Environment script %__TestEnv% not found && exit /b 1)
110111
if "%__PerfTests%"=="true" (
111112
if defined __GenerateLayoutOnly echo %__MsgPrefix%Error: Don't specify both "PerfTests" and "GenerateLayoutOnly" && exit /b 1
112-
if defined __GenerateTestHostOnly echo %__MsgPrefix%Error: Don't specify both "PerfTests" and "GenerateTestHostOnly" && exit /b 1
113113
)
114114

115115
if "%__CoreFXTests%"=="true" (
116116
if defined __GenerateLayoutOnly echo %__MsgPrefix%Error: Don't specify both "CoreFXTests" and "GenerateLayoutOnly" && exit /b 1
117117
)
118118

119+
if defined _CoreFXTestList (
120+
if not exist %_CoreFXTestList% (
121+
echo Couldn't find CoreFX test list %_CoreFXTestList%
122+
exit /b 1
123+
)
124+
)
125+
119126
:: Set the remaining variables based upon the determined configuration
120127
set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%"
121128
set "__TestWorkingDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildType%"
@@ -303,7 +310,7 @@ REM === Run CoreFX tests
303310
REM ===
304311
REM =========================================================================================
305312
:RunCoreFXTests
306-
set COREFX_TESTHOST=%XunitTestBinBase%\testhost
313+
set _CoreFXTestHost=%XunitTestBinBase%\testhost
307314
set _toolsDir=%__ProjectDir%\..\Tools
308315
set _dotnet=%_toolsDir%\dotnetcli\dotnet.exe
309316

@@ -323,14 +330,18 @@ if defined __GenerateTestHostOnly (
323330
exit /b 0
324331
)
325332

326-
if not exist %COREFX_TESTHOST%\dotnet.exe echo CoreFX test host not found, please run runtest.cmd again && exit /b 1
333+
if not exist %_CoreFXTestHost%\dotnet.exe echo CoreFX test host not found, please run runtest.cmd again && exit /b 1
327334

328-
set /p TESTS_REMOTE_URL=< "%__ProjectFilesDir%\CoreFX\CoreFXTestListURL.txt"
329-
set TEST_LIST=%__ProjectFilesDir%\CoreFX\TopN.CoreFX.Windows.issues.json
335+
set /p _CoreFXTestRemoteURL=< "%__ProjectFilesDir%\CoreFX\CoreFXTestListURL.txt"
336+
if not defined _CoreFXTestList ( set _CoreFXTestList=%__ProjectFilesDir%\CoreFX\TopN.CoreFX.Windows.issues.json )
337+
if not exist %_CoreFXTestList% (
338+
echo Couldn't find CoreFX test list %_CoreFXTestList%
339+
exit /b 1
340+
)
330341

331342
echo Downloading CoreFX Test Binaries
332-
echo "%_dotnet%" "%_CoreFXTestUtilitiesOutputPath%\%_CoreFXTestSetupUtilityName%.dll" --clean --outputDirectory "%_CoreFXTestBinariesPath%" --testListJsonPath "%TEST_LIST%" --testUrl "%TESTS_REMOTE_URL%"
333-
call "%_dotnet%" "%_CoreFXTestUtilitiesOutputPath%\%_CoreFXTestSetupUtilityName%.dll" --clean --outputDirectory "%_CoreFXTestBinariesPath%" --testListJsonPath "%TEST_LIST%" --testUrl "%TESTS_REMOTE_URL%"
343+
echo "%_dotnet%" "%_CoreFXTestUtilitiesOutputPath%\%_CoreFXTestSetupUtilityName%.dll" --clean --outputDirectory "%_CoreFXTestBinariesPath%" --testListJsonPath "%_CoreFXTestList%" --testUrl "%_CoreFXTestRemoteURL%"
344+
call "%_dotnet%" "%_CoreFXTestUtilitiesOutputPath%\%_CoreFXTestSetupUtilityName%.dll" --clean --outputDirectory "%_CoreFXTestBinariesPath%" --testListJsonPath "%_CoreFXTestList%" --testUrl "%_CoreFXTestRemoteURL%"
334345
if errorlevel 1 (
335346
exit /b 1
336347
)
@@ -349,8 +360,8 @@ for /D %%i in ("%_CoreFXTestBinariesPath%\*") do (
349360
echo Running !_TestName!
350361
echo Writing logs to !_LogPath!
351362
echo To reproduce directly run:
352-
echo "%COREFX_TESTHOST%\dotnet.exe" "%%i\%_CoreFXTestExecutable%" "%%i\!_TestName!.dll" @"%%i\!_TestName!.rsp" -xml "!_LogPath!\%_CoreFX_TestLogFileName%" -notrait category=nonnetcoreapptests -notrait category=nonwindowstests -notrait category=failing
353-
call "%COREFX_TESTHOST%\dotnet.exe" "%%i\%_CoreFXTestExecutable%" "%%i\!_TestName!.dll" @"%%i\!_TestName!.rsp" -xml "!_LogPath!\\%_CoreFX_TestLogFileName%" -notrait category=nonnetcoreapptests -notrait category=nonwindowstests -notrait category=failing
363+
echo "%_CoreFXTestHost%\dotnet.exe" "%%i\%_CoreFXTestExecutable%" "%%i\!_TestName!.dll" @"%%i\!_TestName!.rsp" -xml "!_LogPath!\%_CoreFX_TestLogFileName%" -notrait category=nonnetcoreapptests -notrait category=nonwindowstests -notrait category=failing
364+
call "%_CoreFXTestHost%\dotnet.exe" "%%i\%_CoreFXTestExecutable%" "%%i\!_TestName!.dll" @"%%i\!_TestName!.rsp" -xml "!_LogPath!\\%_CoreFX_TestLogFileName%" -notrait category=nonnetcoreapptests -notrait category=nonwindowstests -notrait category=failing
354365

355366
)
356367
goto TestsDone
@@ -558,7 +569,7 @@ if errorlevel 1 (
558569
echo %__MsgPrefix%Test Host Dependency Resolution Failed
559570
exit /b 1
560571
)
561-
echo %__MsgPrefix%Created the Test Host layout with all dependencies in %COREFX_TESTHOST%
572+
echo %__MsgPrefix%Created the Test Host layout with all dependencies in %_CoreFXTestHost%
562573

563574
REM Publish and call the CoreFX test helper projects - should this be integrated into runtest.proj?
564575

0 commit comments

Comments
 (0)