Update docs and comments to reflect the renames around build-test and runtest scripts...
authorTomáš Rylek <trylek@microsoft.com>
Fri, 25 Sep 2020 12:28:59 +0000 (14:28 +0200)
committerGitHub <noreply@github.com>
Fri, 25 Sep 2020 12:28:59 +0000 (14:28 +0200)
* 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

16 files changed:
docs/project/jit-testing.md
docs/workflow/building/coreclr/linux-instructions.md
docs/workflow/building/coreclr/osx-instructions.md
docs/workflow/testing/coreclr/running-aspnet-benchmarks-with-crossgen2.md
docs/workflow/testing/coreclr/testing.md
docs/workflow/testing/coreclr/unix-test-instructions.md
docs/workflow/testing/coreclr/windows-test-instructions.md
docs/workflow/testing/using-corerun.md
src/coreclr/tests/bringup_runtest.sh
src/coreclr/tests/runtest.py
src/mono/mono.proj
src/mono/netcore/Makefile
src/tests/build.sh
src/tests/issues.targets
src/tests/run.sh
src/tests/runtesttilstable.sh [moved from src/coreclr/tests/runtesttilstable.sh with 89% similarity]

index 6d127bc..01be1b9 100644 (file)
@@ -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:
 
index 30bfb72..8c6147f 100644 (file)
@@ -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
index 9e363f2..d8bf4fe 100644 (file)
@@ -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
index 4d5c20b..b68e3ce 100644 (file)
@@ -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&#46;NET Benchmarking Runs
index 286a425..23a7287 100644 (file)
@@ -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.
 ```
 <runtime-repo-root>/dotnet.sh build <runtime-repo-root>/src/coreclr/tests/src/JIT/CodegenBringupTests/Array1_d.csproj /p:Configuration=Release
index 2c56ebc..0056150 100644 (file)
@@ -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
 
index 1dc8551..c581c35 100644 (file)
@@ -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_<arch>_<flavor>.html` (e.g. `TestRun_Windows_NT_x64_Checked.html`) in the subdirectory `<repo_root>\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: `<repo_root>\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 `<repo_root>\artifacts\tests\coreclr\Windows_NT.x64.Checked\Exceptions\Finalization\Finalizer.cmd`.
index 989a446..01a2aed 100644 (file)
@@ -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
index e875992..6994426 100755 (executable)
@@ -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=
index 410b0f5..f387fa7 100755 (executable)
@@ -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
 
index 3911b2d..622a70d 100644 (file)
 
   <!-- Run coreclr tests using runtest.py -->
   <Target Name="RunCoreClrTests" DependsOnTargets="ValidateLocalDotnet;PatchCoreClrCoreRoot">
-    <Exec Condition="'$(OS)' == 'Windows_NT'" Command="$(MonoProjectRoot)..\coreclr\tests\runtest.cmd $(CoreClrTestConfig)" ContinueOnError="ErrorAndContinue" />
-    <Exec Condition="'$(OS)' != 'Windows_NT'" Command="$(MonoProjectRoot)../coreclr/tests/./runtest.sh $(CoreClrTestConfig)" ContinueOnError="ErrorAndContinue" />
+    <Exec Condition="'$(OS)' == 'Windows_NT'" Command="$(MonoProjectRoot)..\tests\run.cmd $(CoreClrTestConfig)" ContinueOnError="ErrorAndContinue" />
+    <Exec Condition="'$(OS)' != 'Windows_NT'" Command="$(MonoProjectRoot)../tests/run.sh $(CoreClrTestConfig)" ContinueOnError="ErrorAndContinue" />
   </Target>
 
   <!-- Run Libraries tests using testhost -->
index 365f625..f0dc0c7 100644 (file)
@@ -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)
 
index 59c12ad..243bff9 100755 (executable)
@@ -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}"
index 2157869..9458cb4 100644 (file)
         </ExcludeList>
     </ItemGroup>
 
-    <!-- runtest.proj finds all the *.cmd/*.sh scripts in a test folder and creates corresponding test methods.
+    <!-- run.proj finds all the *.cmd/*.sh scripts in a test folder and creates corresponding test methods.
          Exclude these scripts to avoid creating such methods for the superpmicollect dependent test projects
          and running them separately from superpmicollect test. These should be excluded regardless of RuntimeFlavor/os/arch-->
 
index afc1e80..ac3d8df 100755 (executable)
@@ -6,7 +6,7 @@ function print_usage {
     echo ''
     echo 'Typical command line:'
     echo ''
-    echo 'coreclr/tests/runtest.sh <arch> <configurations>'
+    echo 'src/tests/run.sh <arch> <configurations>'
     echo ''
     echo 'Optional arguments:'
     echo '  --testRootDir=<path>             : Root directory of the test build (e.g. runtime/artifacts/tests/Windows_NT.x64.Debug).'
similarity index 89%
rename from src/coreclr/tests/runtesttilstable.sh
rename to src/tests/runtesttilstable.sh
index a34774d..1c80297 100755 (executable)
@@ -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=$?