-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[Unix|Windows|AllArch] Unify exclusion list and enable runtest.py #19213
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,9 @@ This will use `crossgen.exe` to precompile the test executables before they are | |
|
||
## Building Other Priority Tests | ||
|
||
C:\git\coreclr>build-test.cmd -priority=2 | ||
C:\git\coreclr>build-test.cmd -priority=1 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The priority number should be consistent with the text below. |
||
The number '2' is just an example. The default value (if no priority is specified) is 0. To clarify, if '2' is specified, all tests with CLRTestPriorty 0, 1 **and** 2 will be built and consequently run. | ||
The number '1' is just an example. The default value (if no priority is specified) is 0. To clarify, if '1' is specified, all tests with CLRTestPriorty 0 **and** 1 will be built and consequently run. | ||
|
||
## Examples | ||
|
||
|
@@ -35,7 +35,7 @@ To run a clean, priority 1, crossgen test pass: | |
|
||
### Building Individual Tests | ||
|
||
Note: buildtest.cmd or build.cmd skipnative skipmscorlib needs to be run atleast once | ||
Note: build-test.cmd or build.cmd skipnative needs to be run atleast once | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "at least" |
||
* Native Test: Build the generated Visual Studio solution or make file corresponding to Test cmake file. | ||
|
||
|
@@ -47,7 +47,7 @@ Note: buildtest.cmd or build.cmd skipnative skipmscorlib needs to be run atleast | |
|
||
For example to run all of the tests using your checked build: | ||
|
||
<repo_root>\tests\runtest.cmd -checked | ||
<repo_root>\tests\runtest.cmd checked | ||
|
||
This will generate a report named as `TestRun_<arch>_<flavor>.html` (e.g. `TestRun_Windows_NT__x64__Checked.html`) in the subdirectory `<repo_root>\bin\Logs`. Any tests that failed will be listed in `TestRunResults_Windows_NT__x64__Checked.err`. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,9 +47,33 @@ echo Running %0 > "%INIT_TOOLS_LOG%" | |
set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt" | ||
if exist "%DOTNET_CMD%" goto :afterdotnetrestore | ||
|
||
REM Use x86 tools on arm64 and x86. | ||
REM arm32 host is not currently supported, please crossbuild. | ||
if /i "%PROCESSOR_ARCHITECTURE%" == "arm" ( | ||
echo "Error, arm32 arch not supported for build tools." | ||
exit /b 1 | ||
) | ||
|
||
if /i "%PROCESSOR_ARCHITECTURE%" == "amd64" ( | ||
set _Arch="x64" | ||
goto ArchSet | ||
) | ||
|
||
REM If this is not amd64 and not arm, then we should be running on arm64 or x86 | ||
REM either way we can (and should) use the x86 dotnet cli | ||
REM | ||
REM TODO: consume native arm64 toolset, blocked by official arm64 windows cli | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you make sure there is a GitHub issue related to this, and reference the issue here? |
||
REM : release. See https://github.com/dotnet/coreclr/issues/19614 for more | ||
REM : information | ||
set _Arch="x86" | ||
|
||
echo "init-tools.cmd: Setting arch to %_Arch% for build tools" | ||
|
||
:ArchSet | ||
|
||
echo Installing dotnet cli... | ||
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%" | ||
set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-x64.zip | ||
set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-%_Arch%.zip | ||
set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME% | ||
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME% | ||
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,17 @@ if [ ! -e "$__DOTNET_PATH" ]; then | |
echo "Warning: build not supported on 32 bit Unix" | ||
fi | ||
|
||
__PKG_ARCH=x64 | ||
if [ "$(uname -m)" = "armhf" ] || [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then | ||
if [ "$(uname -m)" = "armhf" ]; then | ||
__PKG_ARCH=arm | ||
fi | ||
|
||
if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then | ||
__PKG_ARCH=arm64 | ||
fi | ||
else | ||
__PKG_ARCH=x64 | ||
fi | ||
|
||
OSName=$(uname -s) | ||
case $OSName in | ||
|
@@ -171,26 +181,30 @@ if [ -n "${DotNetBootstrapCliTarPath-}" ]; then | |
unset ILASMCOMPILER_VERSION | ||
fi | ||
|
||
echo "Initializing BuildTools..." | ||
echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR $__PACKAGES_DIR" >> "$__init_tools_log" | ||
|
||
# Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 | ||
chmod +x "$__BUILD_TOOLS_PATH/init-tools.sh" | ||
"$__BUILD_TOOLS_PATH/init-tools.sh" "$__scriptpath" "$__DOTNET_CMD" "$__TOOLRUNTIME_DIR" "$__PACKAGES_DIR" >> "$__init_tools_log" | ||
if [ "$?" != "0" ]; then | ||
echo "ERROR: An error occurred when trying to initialize the tools." 1>&2 | ||
display_error_message | ||
exit 1 | ||
fi | ||
|
||
echo "Making all .sh files executable under Tools." | ||
# Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 | ||
ls "$__scriptpath/Tools/"*.sh | xargs chmod +x | ||
ls "$__scriptpath/Tools/scripts/docker/"*.sh | xargs chmod +x | ||
# Build tools only supported on x64 | ||
if [ "${__PKG_ARCH}" != "x64" ] && [ "${__PKG_ARCH}" != "arm" ]; then | ||
echo "Skipped installing build tools." | ||
else | ||
echo "Initializing BuildTools..." | ||
echo "Running: $__BUILD_TOOLS_PATH/init-tools.sh $__scriptpath $__DOTNET_CMD $__TOOLRUNTIME_DIR $__PACKAGES_DIR" >> "$__init_tools_log" | ||
|
||
# Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do the build tools use .NET Core 2.0? Who is using 2.0? Is it just users who happen to have 2.0 installed? We should just fail in that case and say, "Install .NET Core 2.1". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am going to consider this out of scope for this change. This will need to be investigated later; however the change is only a whitespace diff here. |
||
chmod +x "$__BUILD_TOOLS_PATH/init-tools.sh" | ||
"$__BUILD_TOOLS_PATH/init-tools.sh" "$__scriptpath" "$__DOTNET_CMD" "$__TOOLRUNTIME_DIR" "$__PACKAGES_DIR" >> "$__init_tools_log" | ||
if [ "$?" != "0" ]; then | ||
echo "ERROR: An error occurred when trying to initialize the tools." 1>&2 | ||
display_error_message | ||
exit 1 | ||
fi | ||
|
||
"$__scriptpath/Tools/crossgen.sh" "$__scriptpath/Tools" $__PKG_RID | ||
echo "Making all .sh files executable under Tools." | ||
# Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 | ||
ls "$__scriptpath/Tools/"*.sh | xargs chmod +x | ||
ls "$__scriptpath/Tools/scripts/docker/"*.sh | xargs chmod +x | ||
|
||
mkdir -p "$(dirname "$__BUILD_TOOLS_SEMAPHORE")" && touch "$__BUILD_TOOLS_SEMAPHORE" | ||
"$__scriptpath/Tools/crossgen.sh" "$__scriptpath/Tools" $__PKG_RID | ||
|
||
echo "Done initializing tools." | ||
mkdir -p "$(dirname "$__BUILD_TOOLS_SEMAPHORE")" && touch "$__BUILD_TOOLS_SEMAPHORE" | ||
|
||
echo "Done initializing tools." | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Tests.lst is currently only used by CI." This isn't true; anyone running Windows arm32 or arm64 would use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For external users this is a true statement, and I expect it to go away very soon.