summaryrefslogtreecommitdiff
path: root/tests/runtest.cmd
diff options
context:
space:
mode:
authorJarret Shook <jashoo@microsoft.com>2018-08-24 21:19:58 -0700
committerGitHub <noreply@github.com>2018-08-24 21:19:58 -0700
commitb34f2bfee8ca2c5f5508f4d58f5b79dc616dcccc (patch)
treee099963dafdc784929e6b175281a908470ce778b /tests/runtest.cmd
parent2d99e088e84a70572b5f9422092ec225d4c27a1c (diff)
downloadcoreclr-b34f2bfee8ca2c5f5508f4d58f5b79dc616dcccc.tar.gz
coreclr-b34f2bfee8ca2c5f5508f4d58f5b79dc616dcccc.tar.bz2
coreclr-b34f2bfee8ca2c5f5508f4d58f5b79dc616dcccc.zip
Use runtest.py to run tests for all platforms (#19213)
Change build-test.sh to always build the xunit wrappers. Before it would drop a token and check the existence of the token. Unify x64 linux/OSX/Windows excludes into one file, issues.targets. Includes different locations in the file which show where to put excludes. Remove all target specific aspects of issues.targets, all tests are excluded now via wildcard, this allows expanding to .cmd and .sh based on the built platform. Unify path separators to forward slash(/) in issues.targets to support both platforms Clean up issues.targets by removing long standing exclude tests, specifically tests that have been excluded due to missing features like rva_statics. Add DisableProjectBuild to tests which have been removed from issues.targets Conditionally add DisableProjectBuild to tests which have been marked as unsupported on unix. This is mostly a port of the unsupportedOnUnix.txt list. Instead of excluding the tests, unix will simply not build them. If tests are built on windows, they will be run but they will return pass, the test wrapper will check return instantly. All exclusions ported to issues.targets for linux targets. Expand runtest.py, this includes simple issues that made it past the original CR. In addition it adds more optional features to help with inner loop dev work such as: creating a repro folder under bin/repro/.. which sets up the env and calls the failing test. In addition a launch.json will now be created under bin/repro/.. which can be used to easily debug using vscode. More logging, such as printing failures, longest running tests ect. Initial excludes ported for arm64 windows Arm64 linux, armhf unix excludes and enables running runtest.sh for these targets. arm64 windows and arm32 windows excludes and enables running runtest.cmd on arm64 targets init-tools.sh changes to pull armhf and aarch64 dotnetcli init-tools.cmd changes to pull x86 packages for dotnetcli for arm64 windows runtest.cmd for almost all scenarios will call runtest.py runtest.sh for almsot all scenarios will call runtest.py Removes all logic for running tests using runtest.sh
Diffstat (limited to 'tests/runtest.cmd')
-rw-r--r--tests/runtest.cmd77
1 files changed, 76 insertions, 1 deletions
diff --git a/tests/runtest.cmd b/tests/runtest.cmd
index fb19439527..45e722f1e7 100644
--- a/tests/runtest.cmd
+++ b/tests/runtest.cmd
@@ -41,6 +41,8 @@ set __CrossgenAltJit=
set __PerfTests=
set __CoreFXTests=
set __CoreFXTestsRunAllAvailable=
+set __SkipGenerateLayout=
+set __BuildXUnitWrappers=
:Arg_Loop
if "%1" == "" goto ArgsDone
@@ -78,6 +80,8 @@ if /i "%1" == "jitforcerelocs" (set COMPlus_ForceRelocs=1&shift&goto Arg_
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)
@@ -90,7 +94,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
@@ -132,6 +136,77 @@ set "__TestWorkingDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildTyp
if not defined XunitTestBinBase set XunitTestBinBase=%__TestWorkingDir%
if not defined XunitTestReportDirBase set XunitTestReportDirBase=%XunitTestBinBase%\Reports\
+REM At this point in the script there will be a divergence in how the tests are run.
+REM For official builds we will continue to run tests using the un-unified scripting
+REM which relies on msbuild and calls runtest.proj directly. For all other scenarios
+REM runtest.py will handle setup and will then call runtest.proj
+
+if defined __AgainstPackages goto SetupMSBuildAndCallRuntestProj
+if "%__CoreFXTests%"=="true" goto SetupMSBuildAndCallRuntestProj
+if "%__PerfTests%"=="true" goto SetupMSBuildAndCallRuntestProj
+if defined __GenerateLayoutOnly goto SetupMSBuildAndCallRuntestProj
+
+REM We are not running in the official build scenario, call runtest.py
+
+set __RuntestPyArgs=-arch %__BuildArch% -build_type %__BuildType%
+
+if defined DoLink (
+ 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
+)
+
+if defined __GenerateLayoutOnly (
+ set __RuntestPyArgs=%__RuntestPyArgs% --generate_layout_only
+)
+
+if defined __BuildXUnitWrappers (
+ set __RuntestPyArgs=%__RuntestPyArgs% --build_xunit_test_wrappers
+)
+
+if defined RunCrossGen (
+ set __RuntestPyArgs=%__RuntestPyArgs% --run_crossgen_tests
+)
+
+if defined __DoCrossgen (
+ set __RuntestPyArgs=%__RuntestPyArgs% --precompile_core_root
+)
+
+REM __ProjectDir is poorly named, it is actually <projectDir>/tests
+set NEXTCMD=python "%__ProjectDir%\runtest.py" %__RuntestPyArgs%
+echo !NEXTCMD!
+!NEXTCMD!
+
+exit /b %ERRORLEVEL%
+
+:SetupMSBuildAndCallRuntestProj
+
:: Set up msbuild and tools environment. Check if msbuild and VS exist.
set _msbuildexe=