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

Commit

Permalink
Enable runtest py for runtest cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
jashook committed Aug 14, 2018
1 parent 7a2a22f commit 5f14f5a
Showing 1 changed file with 52 additions and 9 deletions.
61 changes: 52 additions & 9 deletions tests/runtest.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ set __CrossgenAltJit=
set __PerfTests=
set __CoreFXTests=
set __CoreFXTestsRunAllAvailable=
set __SkipGenerateLayout=
set __BuildXUnitWrappers=

:Arg_Loop
if "%1" == "" goto ArgsDone
Expand Down Expand Up @@ -73,11 +75,13 @@ if /i "%1" == "longgc" (set __LongGCTests=1&shift&goto Arg_Loop)
if /i "%1" == "gcsimulator" (set __GCSimulatorTests=1&shift&goto Arg_Loop)
if /i "%1" == "jitstress" (set COMPlus_JitStress=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "jitstressregs" (set COMPlus_JitStressRegs=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "jitminopts" (set COMPlus_JITMinOpts=1&shift&goto Arg_Loop)
if /i "%1" == "jitminopts" (set COMPlus_JitMinOpts=1&shift&goto Arg_Loop)
if /i "%1" == "jitforcerelocs" (set COMPlus_ForceRelocs=1&shift&goto Arg_Loop)
if /i "%1" == "jitdisasm" (set __JitDisasm=1&shift&goto Arg_Loop)
if /i "%1" == "ilasmroundtrip" (set __IlasmRoundTrip=1&shift&goto Arg_Loop)
if /i "%1" == "GenerateLayoutOnly" (set __GenerateLayoutOnly=1&shift&goto Arg_Loop)
if /i "%1" == "SkipGenerateLayout" (set __SkipGenerateLayout=1&shift&goto Arg_Loop)
if /i "%1" == "BuildXUnitWrappers" (set __BuildXunitWrappers=1&shift&goto Arg_Loop)
if /i "%1" == "PerfTests" (set __PerfTests=true&shift&goto Arg_Loop)
if /i "%1" == "CoreFXTests" (set __CoreFXTests=true&shift&goto Arg_Loop)
if /i "%1" == "CoreFXTestsAll" (set __CoreFXTests=true&set __CoreFXTestsRunAllAvailable=true&shift&goto Arg_Loop)
Expand All @@ -89,7 +93,7 @@ if /i "%1" == "gcname" (set COMPlus_GCName=%2&shift&shift&goto Ar
if /i "%1" == "timeout" (set __TestTimeout=%2&shift&shift&goto Arg_Loop)

REM change it to COMPlus_GCStress when we stop using xunit harness
if /i "%1" == "gcstresslevel" (set __GCSTRESSLEVEL=%2&set __TestTimeout=1800000&shift&shift&goto Arg_Loop)
if /i "%1" == "gcstresslevel" (set COMPlus_GCStress=%2&set __TestTimeout=1800000&shift&shift&goto Arg_Loop)
if /i "%1" == "collectdumps" (set __CollectDumps=true&shift&goto Arg_Loop)

if /i not "%1" == "msbuildargs" goto SkipMsbuildArgs
Expand Down Expand Up @@ -136,20 +140,59 @@ REM For official builds we will continue to run tests using the un-unified scrip
REM which relies on msbuild and calls runtest.proj directly. For all other scenarios
REM runtest.py will handle setup and calls runtest.proj.

if defined __AgainstPackages (
goto SetupMSBuildAndCallRuntestProj
)
if defined __AgainstPackages goto SetupMSBuildAndCallRuntestProj
if "%__CoreFXTests%"=="true" goto SetupMSBuildAndCallRuntestProj
if "%__PerfTests%"=="true" goto SetupMSBuildAndCallRuntestProj

REM We are not running in the official build scenario, call runtest.py

set __RuntestPyArg=""
set __RuntestPyArgs=-arch %__BuildArch% -build_type %__BuildType%

if defined DoLink (
set __RuntestPyArg="%__RuntestPyArgs% --il_link"
set __RuntestPyArgs=%__RuntestPyArgs% --il_link
)

if defined __LongGCTests (
set __RuntestPyArgs=%__RuntestPyArgs% --long_gc
)

if defined __GCSimulatorTests (
set __RuntestPyArgs=%__RuntestPyArgs% --gcsimulator
)

if defined __JitDisasm (
set __RuntestPyArgs=%__RuntestPyArgs% --jitdisasm
)

if defined __IlasmRoundTrip (
set __RuntestPyArgs=%__RuntestPyArgs% --ilasmroundtrip
)

if defined __TestEnv (
set __RuntestPyArgs=%__RuntestPyArgs% -test_env %__TestEnv%
)

if defined __Sequential (
set __RuntestPyArgs=%__RuntestPyArgs% --sequential
)

if not defined __SkipGenerateLayout (
set __RuntestPyArgs=%__RuntestPyArgs% --generate_layout
)

echo "%__ProjectDir%"\tests\runtest.py
python "%__ProjectDir%"\tests\runtest.py
if defined __GenerateLayoutOnly (
set __RuntestPyArgs=%__RuntestPyArgs% --generate_layout_only
)

if defined __BuildXUnitWrappers (
set __RuntestPyArgs=%__RuntestPyArgs% --build_xunit_test_wrappers
)

REM __ProjectDir is poorly named, it is actually <projectDir>/tests
echo "%__ProjectDir%\runtest.py" %__RuntestPyArgs%
python "%__ProjectDir%\runtest.py" %__RuntestPyArgs%

exit /b %ERRORLEVEL%

:SetupMSBuildAndCallRuntestProj

Expand Down

0 comments on commit 5f14f5a

Please sign in to comment.