diff --git a/src/tests/run.cmd b/src/tests/run.cmd index 56666656a7bf5e..e86261b969234f 100644 --- a/src/tests/run.cmd +++ b/src/tests/run.cmd @@ -29,6 +29,8 @@ set __LongGCTests= set __GCSimulatorTests= set __IlasmRoundTrip= set __PrintLastResultsOnly= +set __Verbose= +set __LimitedCoreDumps= set LogsDirArg= set RunInUnloadableContext= set TieringTest= @@ -65,8 +67,8 @@ if /i "%1" == "jitforcerelocs" (set DOTNET_ForceRelocs= if /i "%1" == "printlastresultsonly" (set __PrintLastResultsOnly=1&shift&goto Arg_Loop) if /i "%1" == "logsdir" (set LogsDirArg=%2&shift&shift&goto Arg_Loop) if /i "%1" == "runcrossgen2tests" (set RunCrossGen2=1&shift&goto Arg_Loop) -REM This test feature is currently intentionally undocumented if /i "%1" == "runlargeversionbubblecrossgen2tests" (set RunCrossGen2=1&set CrossgenLargeVersionBubble=1&shift&goto Arg_Loop) +if /i "%1" == "composite" (set __CompositeBuildMode=1&shift&goto Arg_Loop) if /i "%1" == "synthesizepgo" (set CrossGen2SynthesizePgo=1&shift&goto Arg_Loop) if /i "%1" == "gcname" (set DOTNET_GCName=%2&shift&shift&goto Arg_Loop) if /i "%1" == "gcstresslevel" (set DOTNET_GCStress=%2&set __TestTimeout=1800000&shift&shift&goto Arg_Loop) @@ -79,6 +81,8 @@ if /i "%1" == "tieringtest" (set TieringTest=1&shift if /i "%1" == "runnativeaottests" (set RunNativeAot=1&shift&goto Arg_Loop) if /i "%1" == "interpreter" (set RunInterpreter=1&shift&goto Arg_Loop) if /i "%1" == "node" (set RunWithNodeJS=1&shift&goto Arg_Loop) +if /i "%1" == "verbose" (set __Verbose=1&shift&goto Arg_Loop) +if /i "%1" == "limiteddumpgeneration" (set __LimitedCoreDumps=1&shift&goto Arg_Loop) if /i not "%1" == "msbuildargs" goto SkipMsbuildArgs :: All the rest of the args will be collected and passed directly to msbuild. @@ -167,6 +171,10 @@ if defined CrossgenLargeVersionBubble ( set __RuntestPyArgs=%__RuntestPyArgs% --large_version_bubble ) +if defined __CompositeBuildMode ( + set __RuntestPyArgs=%__RuntestPyArgs% --composite +) + if defined CrossGen2SynthesizePgo ( set __RuntestPyArgs=%__RuntestPyArgs% --synthesize_pgo ) @@ -195,6 +203,14 @@ if defined RunWithNodeJS ( set __RuntestPyArgs=%__RuntestPyArgs% --node ) +if defined __Verbose ( + set __RuntestPyArgs=%__RuntestPyArgs% --verbose +) + +if defined __LimitedCoreDumps ( + set __RuntestPyArgs=%__RuntestPyArgs% --limited_core_dumps +) + REM Find python and set it to the variable PYTHON set _C=-c "import sys; sys.stdout.write(sys.executable)" (py -3 %_C% || py -2 %_C% || python3 %_C% || python2 %_C% || python %_C%) > %TEMP%\pythonlocation.txt 2> NUL @@ -235,6 +251,8 @@ echo TestEnv ^ - Run a custom script before every test to set echo sequential - Run tests sequentially ^(no parallelism^). echo parallel ^ - Run tests with given level of parallelism: none, collections, assemblies, all. Default: collections. echo RunCrossgen2Tests - Runs ReadytoRun tests compiled with Crossgen2 +echo runlargeversionbubblecrossgen2tests - ^(Experimental^) Runs Crossgen2 tests with large version bubble enabled. +echo composite - ^(Experimental^) Use Crossgen2 composite mode for tests. echo synthesizepgo - Enabled synthesizing PGO data in CrossGen2 echo jitstress ^ - Runs the tests with DOTNET_JitStress=n echo jitstressregs ^ - Runs the tests with DOTNET_JitStressRegs=n @@ -259,8 +277,12 @@ echo Note: some options override this ^(gcstressleve echo logsdir ^ - Specify the logs directory ^(default: artifacts/log^) echo msbuildargs ^ - Pass all subsequent args directly to msbuild invocations. echo ^ - Path to the runtime to test ^(if specified^). +echo tieringtest - Run each test to encourage tier1 rejitting. +echo runnativeaottests - Run NativeAOT compiled tests. echo interpreter - Runs the tests with the interpreter enabled. -echo node - Runs the tests with NodeJS ^(wasm only^). +echo node - Runs the tests with NodeJS ^(wasm only^). +echo verbose - Enable verbose output ^(show output from each test^). +echo limitedDumpGeneration - Limits the number of core dumps generated for this test run. echo. echo Note that arguments are not case-sensitive. echo. diff --git a/src/tests/run.py b/src/tests/run.py index 21b2f47eb9bb20..240a19391510ad 100755 --- a/src/tests/run.py +++ b/src/tests/run.py @@ -103,6 +103,7 @@ parser.add_argument("--ilasmroundtrip", dest="ilasmroundtrip", action="store_true", default=False) parser.add_argument("--run_crossgen2_tests", dest="run_crossgen2_tests", action="store_true", default=False) parser.add_argument("--large_version_bubble", dest="large_version_bubble", action="store_true", default=False) +parser.add_argument("--composite", dest="composite", action="store_true", default=False) parser.add_argument("--synthesize_pgo", dest="synthesize_pgo", action="store_true", default=False) parser.add_argument("--sequential", dest="sequential", action="store_true", default=False) parser.add_argument("--interpreter", dest="interpreter", action="store_true", default=False) @@ -834,6 +835,10 @@ def run_tests(args, print("Large Version Bubble enabled") os.environ["LargeVersionBubble"] = "1" + if args.composite: + print("Composite Crossgen2 mode enabled") + os.environ["CompositeBuildMode"] = "1" + if args.synthesize_pgo: print("Synthesizing PGO") os.environ["CrossGen2SynthesizePgo"] = "1" @@ -979,6 +984,11 @@ def setup_args(args): lambda arg: True, "Error setting large_version_bubble") + coreclr_setup_args.verify(args, + "composite", + lambda arg: True, + "Error setting composite") + coreclr_setup_args.verify(args, "run_crossgen2_tests", lambda unused: True, diff --git a/src/tests/run.sh b/src/tests/run.sh index 5c3d2b53b991c1..ce23324ca7dc35 100755 --- a/src/tests/run.sh +++ b/src/tests/run.sh @@ -20,7 +20,10 @@ function print_usage { echo ' --coreRootDir= : Directory to the CORE_ROOT location.' echo ' --enableEventLogging : Enable event logging through LTTNG.' echo ' --sequential : Run tests sequentially (default is to run in parallel).' + echo ' --parallel= : Run tests in parallel (none, collections, assemblies, all) (default: collections).' echo ' --runcrossgen2tests : Runs the ReadyToRun tests compiled with Crossgen2' + echo ' --runlargeversionbubblecrossgen2tests : (Experimental) Runs Crossgen2 tests with large version bubble enabled' + echo ' --composite : (Experimental) Use Crossgen2 composite mode for tests' echo ' --synthesizepgo : Runs the tests allowing crossgen2 to synthesize PGO data' echo ' --jitstress= : Runs the tests with DOTNET_JitStress=n' echo ' --jitstressregs= : Runs the tests with DOTNET_JitStressRegs=n' @@ -43,7 +46,7 @@ function print_usage { echo ' --runnativeaottests : Run NativeAOT compiled tests' echo ' --interpreter : Runs the tests with the interpreter enabled' echo ' --node : Runs the tests with NodeJS (wasm only)' - echo ' --limitedDumpGeneration : ' + echo ' --limitedDumpGeneration : Limits the number of core dumps generated for this test run' } # Exit code constants @@ -70,9 +73,12 @@ verbose=0 ilasmroundtrip= printLastResultsOnly= runSequential=0 +parallelType= runincontext=0 tieringtest=0 nativeaottest=0 +largeversionbubble=0 +compositemode=0 for i in "$@" do @@ -153,12 +159,22 @@ do --runcrossgen2tests) export RunCrossGen2=1 ;; + --runlargeversionbubblecrossgen2tests) + export RunCrossGen2=1 + largeversionbubble=1 + ;; + --composite) + compositemode=1 + ;; --synthesizepgo) export CrossGen2SynthesizePgo=1 ;; --sequential) runSequential=1 ;; + --parallel=*) + parallelType=${i#*=} + ;; --useServerGC) export DOTNET_gcServer=1 ;; @@ -275,6 +291,10 @@ if [ "$runSequential" -ne 0 ]; then runtestPyArguments+=("--sequential") fi +if [[ -n "$parallelType" ]]; then + runtestPyArguments+=("-parallel" "$parallelType") +fi + if [[ -n "$printLastResultsOnly" ]]; then runtestPyArguments+=("--analyze_results_only") fi @@ -283,6 +303,14 @@ if [[ -n "$RunCrossGen2" ]]; then runtestPyArguments+=("--run_crossgen2_tests") fi +if [[ "$largeversionbubble" -ne 0 ]]; then + runtestPyArguments+=("--large_version_bubble") +fi + +if [[ "$compositemode" -ne 0 ]]; then + runtestPyArguments+=("--composite") +fi + if [[ -n "$CrossGen2SynthesizePgo" ]]; then runtestPyArguments+=("--synthesize_pgo") fi @@ -298,7 +326,7 @@ fi if [[ "$tieringtest" -ne 0 ]]; then echo "Running to encourage tier1 rejitting" - runtestPyArguments+=("--tieringtest") + runtestPyArguments+=("--tiering_test") fi if [[ "$nativeaottest" -ne 0 ]]; then