Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 2.1 KB

RunningTests.md

File metadata and controls

42 lines (30 loc) · 2.1 KB

Running .NET Core Tests

Details on test metadata can be found in test-configuration.md.

Build All Tests

  1. Build the CoreCLR product
  2. From the root directory run the following command:
    • Non-Windows - ./build-test.sh
    • Windows - build-test.cmd
    • Supply -h for usage flags

Examples

  • Build all tests priority 2 and higher
    • build-test.cmd -priority=2

Build Individual Test

Note: The CoreCLR must be built prior to building an individual test. See first step 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
  • Managed Test: Invoke MSBuild on the project directly
    • Non-Windows - All of the necessary tools to build are under coreclr/Tools. It is possible to use coreclr/Tools/MSBuild.dll as you would normally use MSBuild with a few caveats. The coreclr/Tools/msbuild.sh script exists to make the call shorter.
      • Note: Passing /p:__BuildOs=[OSX|Linux] is required.
    • Windows - Use Visual Studio Developer command prompt

Examples

  • Using the msbuild.sh script
    • coreclr/Tools/msbuild.sh /maxcpucount coreclr/tests/src/JIT/CodeGenBringUpTests/Array1.csproj /p:__BuildType=Release /p:__BuildOS=OSX
  • Calling MSBuild.dll directly
    • coreclr/Tools/dotnetcli/dotnet coreclr/Tools/MSBuild.dll /maxcpucount coreclr/tests/src/JIT/CodeGenBringUpTests/Array1.csproj /p:__BuildType=Release /p:__BuildOS=OSX

Additional Documents