From bafb24c06197948e9600837c2e4700df725600a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1=C5=A1=20Rylek?= Date: Fri, 25 Sep 2020 14:28:59 +0200 Subject: [PATCH] Update docs and comments to reflect the renames around build-test and runtest scripts (#42708) * Move the script runtesttilstable.sh under src/tests * Update most references to build-test / runtest in the runtime repo With this change I can't find any remaining orphaned references to the old script names except for a few superpmi-related scripts I need to follow up on separately as I'm not too familiar with their functionality. Thanks Tomas --- docs/project/jit-testing.md | 4 ++-- docs/workflow/building/coreclr/linux-instructions.md | 4 ++-- docs/workflow/building/coreclr/osx-instructions.md | 4 ++-- .../running-aspnet-benchmarks-with-crossgen2.md | 6 ++---- docs/workflow/testing/coreclr/testing.md | 14 +++++++------- .../workflow/testing/coreclr/unix-test-instructions.md | 12 ++++++------ .../testing/coreclr/windows-test-instructions.md | 18 +++++++++--------- docs/workflow/testing/using-corerun.md | 4 ++-- src/coreclr/tests/bringup_runtest.sh | 4 ++-- src/coreclr/tests/runtest.py | 4 ++-- src/mono/mono.proj | 4 ++-- src/mono/netcore/Makefile | 2 +- src/tests/build.sh | 6 +++--- src/tests/issues.targets | 2 +- src/tests/run.sh | 2 +- src/{coreclr => }/tests/runtesttilstable.sh | 16 ++++++++-------- 16 files changed, 52 insertions(+), 54 deletions(-) rename src/{coreclr => }/tests/runtesttilstable.sh (89%) diff --git a/docs/project/jit-testing.md b/docs/project/jit-testing.md index 6d127bc..01be1b9 100644 --- a/docs/project/jit-testing.md +++ b/docs/project/jit-testing.md @@ -69,9 +69,9 @@ moving these. We need to ensure that the CoreCLR repo contains a suitably hookable test script. Core testing is driven by xunit but there's typically a -wrapper around this (runtest.cmd today) to facilitate test execution. +wrapper around this (run.cmd today) to facilitate test execution. -The proposal is to implement platform-neutral variant of runtest.cmd that +The proposal is to implement platform-neutral variant of run.cmd that contains all the existing functionality plus some additional capabilities for JIT testing. Initially this will mean: diff --git a/docs/workflow/building/coreclr/linux-instructions.md b/docs/workflow/building/coreclr/linux-instructions.md index 30bfb72..8c6147f 100644 --- a/docs/workflow/building/coreclr/linux-instructions.md +++ b/docs/workflow/building/coreclr/linux-instructions.md @@ -91,7 +91,7 @@ The Core_Root folder will contain the built binaries, generated by `build.sh`, a the libraries subset (`-subset libs`) before this command can be run. ``` -./src/coreclr/build-test.sh generatelayoutonly +./src/tests/build.sh generatelayoutonly ``` After the build is complete you will find the output in the `artifacts/tests/coreclr/Linux.x64.Debug/Tests/Core_Root` folder. @@ -99,7 +99,7 @@ After the build is complete you will find the output in the `artifacts/tests/cor Running a single test =================== -After `src/coreclr/build-test.sh` is run, `corerun` from the Core_Root folder is ready to be run. This can be done by using the full absolute path to `corerun`, or by setting an environment variable to the Core_Root folder. +After `src/tests/build.sh` is run, `corerun` from the Core_Root folder is ready to be run. This can be done by using the full absolute path to `corerun`, or by setting an environment variable to the Core_Root folder. ```sh export CORE_ROOT=/runtime/artifacts/tests/coreclr/Linux.x64.Debug/Tests/Core_Root diff --git a/docs/workflow/building/coreclr/osx-instructions.md b/docs/workflow/building/coreclr/osx-instructions.md index 9e363f2..d8bf4fe 100644 --- a/docs/workflow/building/coreclr/osx-instructions.md +++ b/docs/workflow/building/coreclr/osx-instructions.md @@ -66,7 +66,7 @@ Create the Core_Root The Core_Root folder will have the built binaries, from `src/coreclr/build.sh` and it will also include the CoreFX packages required to run tests. ``` -./src/coreclr/build-test.sh generatelayoutonly +./src/tests/build.sh generatelayoutonly ``` After the build is complete you will be able to find the output in the `artifacts/tests/coreclr/OSX.x64.Debug/Tests/Core_Root` folder. @@ -74,7 +74,7 @@ After the build is complete you will be able to find the output in the `artifact Running a single test =================== -After `src/coreclr/build-test.sh` is run, corerun from the Core_Root folder is ready to be run. This can be done by using the full absolute path to corerun, or by setting +After `src/tests/build.sh` is run, corerun from the Core_Root folder is ready to be run. This can be done by using the full absolute path to corerun, or by setting an environment variable to the Core_Root folder. ```sh diff --git a/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md b/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md index 4d5c20b..b68e3ce 100644 --- a/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md +++ b/docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md @@ -24,16 +24,14 @@ For Windows: ```powershell .\build.cmd -subset clr+libs -c release -cd src\coreclr -.\build-test.cmd Release generatelayoutonly +.\src\tests\build.cmd Release generatelayoutonly ``` For Linux: ```bash ./build.sh -subset clr+libs -c release -cd src/coreclr -./build-test.sh -release -generatelayoutonly +./src/tests/build.sh -release -generatelayoutonly ``` ### Generate a Configuration File for ASP.NET Benchmarking Runs diff --git a/docs/workflow/testing/coreclr/testing.md b/docs/workflow/testing/coreclr/testing.md index 286a425..23a7287 100644 --- a/docs/workflow/testing/coreclr/testing.md +++ b/docs/workflow/testing/coreclr/testing.md @@ -9,9 +9,9 @@ Details on test metadata can be found in [test-configuration.md](test-configurat * [macOS](../../building/coreclr/osx-instructions.md) * [Windows](../../building/coreclr/README.md) 2) [Build the libraries](../../building/libraries/README.md) in Release configuration. Pass the configuration of CoreCLR you just built to the build script (e.g. `-runtimeconfiguration debug`). -3) From the `src/coreclr` directory run the following command: - * Non-Windows - `./build-test.sh` - * Windows - `build-test.cmd` +3) From the root directory run the following command: + * Non-Windows - `src/tests/build.sh` + * Windows - `src\tests\build.cmd` * Supply `-h` for usage flags ### Test priority @@ -21,16 +21,16 @@ The CoreCLR tests have two priorities, 0 and 1. The priority 0 tests run by defa ### Examples * Build all tests priority 1 and higher - * `build-test.cmd -priority=1` - * `build-test.sh -priority1` + * `build.cmd -priority=1` + * `build.sh -priority1` ## Build Individual Test Note: CoreCLR must be built prior to building an individual test. See the first step, above, for building all tests. * Native Test: Build the generated CMake projects - * Projects are auto-generated when the `build-test.sh`/`build-test.cmd` script is run - * It is possible to explicitly run only the native test build with `build-test.sh/cmd skipmanaged` + * Projects are auto-generated when the `build.sh`/`build.cmd` script is run + * It is possible to explicitly run only the native test build with `build.sh/cmd skipmanaged` * Managed Test: Invoke `dotnet build` on the project directly. `dotnet` can be the `dotnet.sh` or `dotnet.cmd` script in the repo root. ``` /dotnet.sh build /src/coreclr/tests/src/JIT/CodegenBringupTests/Array1_d.csproj /p:Configuration=Release diff --git a/docs/workflow/testing/coreclr/unix-test-instructions.md b/docs/workflow/testing/coreclr/unix-test-instructions.md index 2c56ebc..0056150 100644 --- a/docs/workflow/testing/coreclr/unix-test-instructions.md +++ b/docs/workflow/testing/coreclr/unix-test-instructions.md @@ -15,13 +15,13 @@ Dotnet CLI is required to build the tests. This can be done on any platform then To build the tests on Unix: ```sh -./src/coreclr/build-test.sh +./src/tests/build.sh ``` Please note that this builds the Priority 0 tests. To build priority 1: ```sh -./src/coreclr/build-test.sh -priority1 +./src/tests/build.sh -priority1 ``` ## Building Individual Tests @@ -41,16 +41,16 @@ During development there are many instances where building an individual test is The following instructions assume that on the Unix machine: - The CoreCLR repo is cloned at `/mnt/coreclr` -`src/coreclr/build-test.sh` will have set up the `Core_Root` directory correctly after the test build. +`src/tests/build.sh` will have set up the `Core_Root` directory correctly after the test build. ```sh -./src/coreclr/tests/runtest.sh x64 checked +./src/tests/run.sh x64 checked ``` Please use the following command for help. ```sh -./src/coreclr/tests/runtest.sh -h +./src/tests/run.sh -h ``` ### Unsupported and temporarily disabled tests @@ -65,7 +65,7 @@ the conditional property This property disables building of a test in a default build. It also disables running a test in the bash/batch wrapper scripts. It allows the test to be built on any target in CI when the `allTargets` option is -passed to the `build-test.*` scripts. +passed to the `build.*` scripts. Tests which never should be built or run are marked diff --git a/docs/workflow/testing/coreclr/windows-test-instructions.md b/docs/workflow/testing/coreclr/windows-test-instructions.md index 1dc8551..c581c35 100644 --- a/docs/workflow/testing/coreclr/windows-test-instructions.md +++ b/docs/workflow/testing/coreclr/windows-test-instructions.md @@ -6,13 +6,13 @@ Building and running tests on Windows Building coreclr tests must be done using a specific script as follows: ``` -> src\coreclr\build-test.cmd +> src\tests\build.cmd ``` ## Building Precompiled Tests ``` -> src\coreclr\build-test.cmd crossgen +> src\tests\build.cmd crossgen ``` This will use `crossgen.exe` to precompile test executables before they are executed. @@ -20,7 +20,7 @@ This will use `crossgen.exe` to precompile test executables before they are exec ## Building Specific Priority Tests ``` -> src\coreclr\build-test.cmd -priority=1 +> src\tests\build.cmd -priority=1 ``` The above is an example of requesting that priority '1' and below be built. The default priority value is '0'. If '1' is specified, all tests with `CLRTestPriorty` `0` **and** `1` will be built and run. @@ -30,18 +30,18 @@ The above is an example of requesting that priority '1' and below be built. The To run a priority '0' and '1' and crossgen'd test pass: ``` -> src\coreclr\build-test.cmd crossgen -priority=1 +> src\tests\build.cmd crossgen -priority=1 ``` For additional supported parameters use the following: ``` -> src\coreclr\build-test.cmd -? +> src\tests\build.cmd -? ``` ### Building Individual Tests -**Note:** `build-test.cmd skipmanaged [Any additional flags]` needs to be run at least once if the individual test has native assets. +**Note:** `build.cmd skipmanaged [Any additional flags]` needs to be run at least once if the individual test has native assets. * Native Test: Build the generated Visual Studio solution or makefile corresponding to test cmake file. @@ -52,13 +52,13 @@ For additional supported parameters use the following: Will list supported parameters. ``` -> src\coreclr\tests\runtest.cmd /? +> src\tests\run.cmd /? ``` In order to run all of the tests using your checked build: ``` -> src\coreclr\tests\runtest.cmd checked +> src\tests\run.cmd checked ``` This will generate a report named `TestRun__.html` (e.g. `TestRun_Windows_NT_x64_Checked.html`) in the subdirectory `\artifacts\log`. Any tests that failed will be listed in `TestRunResults_Windows_NT_x64_Checked.err`. @@ -78,7 +78,7 @@ There are 2 files of interest: If you wish to re-run a failed test, follow the following steps: -1) Set an environment variable, `CORE_ROOT`, pointing to the path to product binaries that was passed to runtest.cmd. +1) Set an environment variable, `CORE_ROOT`, pointing to the path to product binaries that was passed to run.cmd. For example using a checked build the location would be: `\artifacts\tests\coreclr\Windows_NT.x64.Checked\Tests\Core_Root` 2) Run the failed test, the command to which is also present in the test report for a failed test. It will be something like `\artifacts\tests\coreclr\Windows_NT.x64.Checked\Exceptions\Finalization\Finalizer.cmd`. diff --git a/docs/workflow/testing/using-corerun.md b/docs/workflow/testing/using-corerun.md index 989a446..01a2aed 100644 --- a/docs/workflow/testing/using-corerun.md +++ b/docs/workflow/testing/using-corerun.md @@ -61,7 +61,7 @@ your new runtime. ## How CoreCLR Tests use corerun.exe -When you execute 'runtime/src/coreclr/build-test.cmd' one of the things that it does is set up a directory where it +When you execute 'runtime/src/tests/build.cmd' one of the things that it does is set up a directory where it gathers the CoreCLR that has just been built with the pieces of the class library that tests need. It places this runtime in the directory ```bat @@ -70,7 +70,7 @@ It places this runtime in the directory off the CoreCLR Repository. The way the tests are expected to work is that you set the environment variable CORE_ROOT to this directory (you don't have to set CORE_LIBRARIES) and you can run any tests. For example after building the tests -(running build-test at the repository base) and running 'test\runtest') you can do the following +(running src\tests\build from the repository base) and running 'src\tests\run') you can do the following ```bat set PATH=%PATH%;%CoreCLR%\artifacts\Product\Windows_NT.x64.Debug diff --git a/src/coreclr/tests/bringup_runtest.sh b/src/coreclr/tests/bringup_runtest.sh index e875992..6994426 100755 --- a/src/coreclr/tests/bringup_runtest.sh +++ b/src/coreclr/tests/bringup_runtest.sh @@ -6,7 +6,7 @@ function print_usage { echo '' echo 'Typical command line:' echo '' - echo 'coreclr/tests/runtest.sh' + echo 'src/tests/run.sh' echo ' --testRootDir="temp/Windows_NT.x64.Debug"' echo ' --testNativeBinDir="runtime/artifacts/obj/Linux.x64.Debug/tests"' echo ' --coreOverlayDir="runtime/artifacts/tests/Linux.x64.Debug/Tests/Core_Root"' @@ -100,7 +100,7 @@ countSkippedTests=0 xunitOutputPath= xunitTestOutputPath= -# Variables for text file output. These can be passed back to runtest.sh using the "--playlist" argument +# Variables for text file output. These can be passed back to run.sh using the "--playlist" argument # to rerun specific tests. testsPassOutputPath= testsFailOutputPath= diff --git a/src/coreclr/tests/runtest.py b/src/coreclr/tests/runtest.py index 410b0f5..f387fa7 100755 --- a/src/coreclr/tests/runtest.py +++ b/src/coreclr/tests/runtest.py @@ -431,9 +431,9 @@ def create_and_use_test_env(_os, env, func): Notes: Using the env passed, create a temporary file to use as the - test_env to be passed for runtest.cmd. Note that this only happens + test_env to be passed for run.cmd. Note that this only happens on windows, until xunit is used on unix there is no managed code run - in runtest.sh. + in run.sh. """ global gc_stress diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 3911b2d..622a70d 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -926,8 +926,8 @@ - - + + diff --git a/src/mono/netcore/Makefile b/src/mono/netcore/Makefile index 365f625..f0dc0c7 100644 --- a/src/mono/netcore/Makefile +++ b/src/mono/netcore/Makefile @@ -58,7 +58,7 @@ copy-runtime-files-to: # run specific coreclr test, e.g.: # make run-tests-coreclr CoreClrTest="bash ../../artifacts/tests/coreclr/OSX.x64.Release/JIT/opt/InstructionCombining/DivToMul/DivToMul.sh" -# NOTE: make sure you've built them (cd src/coreclr && ./build-test.sh release) +# NOTE: make sure you've built them (cd src/tests && ./build.sh release) run-tests-coreclr: $(DOTNET) msbuild /t:RunCoreClrTest /p:CoreClrTest="$(CoreClrTest)" $(MONO_PROJ) diff --git a/src/tests/build.sh b/src/tests/build.sh index 59c12adc..243bff9 100755 --- a/src/tests/build.sh +++ b/src/tests/build.sh @@ -680,7 +680,7 @@ if [[ "$__RunTests" -ne 0 ]]; then echo "Run Tests..." - nextCommand="$__TestDir/runtest.sh --testRootDir=$__TestBinDir --coreClrBinDir=$__BinDir --coreFxBinDir=$CORE_ROOT --testNativeBinDir=$__testNativeBinDir" + nextCommand="$__TestDir/run.sh --testRootDir=$__TestBinDir --coreClrBinDir=$__BinDir --coreFxBinDir=$CORE_ROOT --testNativeBinDir=$__testNativeBinDir" echo "$nextCommand" eval $nextCommand @@ -692,9 +692,9 @@ else echo " coreFxBinDir = $CORE_ROOT" echo " testNativeBinDir = $__testNativeBinDir" echo " -------------------------------------------------- " - echo " Example runtest.sh command" + echo " Example run.sh command" echo "" - echo " ./tests/runtest.sh --coreOverlayDir=$CORE_ROOT --testNativeBinDir=$__testNativeBinDir --testRootDir=$__TestBinDir --copyNativeTestBin $__BuildType" + echo " src/tests/run.sh --coreOverlayDir=$CORE_ROOT --testNativeBinDir=$__testNativeBinDir --testRootDir=$__TestBinDir --copyNativeTestBin $__BuildType" echo " -------------------------------------------------- " echo "To run single test use the following command:" echo " bash ${__TestBinDir}/__TEST_PATH__/__TEST_NAME__.sh -coreroot=${CORE_ROOT}" diff --git a/src/tests/issues.targets b/src/tests/issues.targets index 2157869..9458cb4 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -931,7 +931,7 @@ - diff --git a/src/tests/run.sh b/src/tests/run.sh index afc1e80..ac3d8df 100755 --- a/src/tests/run.sh +++ b/src/tests/run.sh @@ -6,7 +6,7 @@ function print_usage { echo '' echo 'Typical command line:' echo '' - echo 'coreclr/tests/runtest.sh ' + echo 'src/tests/run.sh ' echo '' echo 'Optional arguments:' echo ' --testRootDir= : Root directory of the test build (e.g. runtime/artifacts/tests/Windows_NT.x64.Debug).' diff --git a/src/coreclr/tests/runtesttilstable.sh b/src/tests/runtesttilstable.sh similarity index 89% rename from src/coreclr/tests/runtesttilstable.sh rename to src/tests/runtesttilstable.sh index a34774d..1c80297 100755 --- a/src/coreclr/tests/runtesttilstable.sh +++ b/src/tests/runtesttilstable.sh @@ -4,21 +4,21 @@ function print_usage { echo '' echo 'CoreCLR test runner wrapper script.' echo '' - echo 'Run tests using runtest.sh, then rerun the failures, if any,' + echo 'Run tests using run.sh, then rerun the failures, if any,' echo 'until the number of failures stabilizes. Thus, when running' echo 'flaky tests, or running tests on a flaky platform, only the' echo 'repeatable, "real", failures are reported.' echo '' - echo 'Tests are rerun in sequential mode (passing --sequential to runtest.sh).' + echo 'Tests are rerun in sequential mode (passing --sequential to run.sh).' echo 'This hopefully avoids resource exhaustion and other parallel run problems.' echo '' echo 'A maximum number of iterations can be specified.' echo '' echo 'Command line:' echo '' - echo 'runtesttilstable.sh [options] [arguments for runtest.sh]' + echo 'runtesttilstable.sh [options] [arguments for run.sh]' echo '' - echo 'Any unknown argument is passed directly to runtest.sh.' + echo 'Any unknown argument is passed directly to run.sh.' echo '' echo 'Optional arguments:' echo ' -h|--help : Show usage information.' @@ -89,7 +89,7 @@ do ;; --testRootDir=*) testRootDir=${i#*=} - # Also pass it on to runtest.sh + # Also pass it on to run.sh __UnprocessedBuildArgs="$__UnprocessedBuildArgs $i" ;; *) @@ -98,7 +98,7 @@ do esac done -# Check testRootDir; this check is also done by runtest.sh. +# Check testRootDir; this check is also done by run.sh. if [ -z "$testRootDir" ]; then echo "--testRootDir is required." @@ -112,7 +112,7 @@ fi # Now start running the tests. -nextcmd="${scriptPath}/runtest.sh ${playlistArgument} ${__UnprocessedBuildArgs}" +nextcmd="${scriptPath}/run.sh ${playlistArgument} ${__UnprocessedBuildArgs}" echo "Running: $nextcmd" $nextcmd exitCode=$? @@ -143,7 +143,7 @@ if [ $exitCode -eq $EXIT_CODE_TEST_FAILURE ]; then fi mv "$testRootDir/coreclrtests.fail.txt" "$retryFile" - nextcmd="${scriptPath}/runtest.sh --sequential --playlist=${retryFile} ${__UnprocessedBuildArgs}" + nextcmd="${scriptPath}/run.sh --sequential --playlist=${retryFile} ${__UnprocessedBuildArgs}" echo "Running: $nextcmd" $nextcmd exitCode=$? -- 2.7.4