Skip to content

Commit 10c9a33

Browse files
CopilotdavidwrightonCopilot
authored
Update and create documentation in build.cmd and build.sh for CoreCLR test builds (#126951)
## Summary Updates the help text/documentation in `src/tests/build.cmd` and `src/tests/build.sh` for the CoreCLR test build scripts. ## Changes ### `src/tests/build.cmd` - Added `wasm` to the list of valid build architectures in the usage section - Added an **OS targeting** section documenting `os <value>`, `browser` (shorthand for `os browser`), and `wasi` (shorthand for `os wasi`) options - Added `-CoreCLR` to the usage section (the option was implemented in the code but missing from the help text) ### `src/tests/build.sh` - Added an **OS targeting** section to `usage_list` documenting the `-os <value>` option (handled by the common build framework), listing common OS values, and noting that native test components are automatically skipped for mobile/device targets (`android`, `ios`, `iossimulator`, `tvos`, `tvossimulator`) - Added `-coreclr` to `usage_list` (the option was implemented in the code but missing from the help text) - Fixed escaped characters (`^(`, `^)`) and Windows-style backslashes in path examples that were incorrectly copied from the Windows batch script ## Command sync check | Option | build.cmd | build.sh | |---|---|---| | OS targeting | `os <value>`, `browser`, `wasi` | `-os <value>` (via common framework) | | Architecture | `x64`, `x86`, `arm64`, `wasm` | Same (via common framework) | | `-CoreCLR` / `-coreclr` | ✅ (now documented) | ✅ (now documented) | | `-Mono` / `-ExcludeMonoFailures` | ✅ | ✅ | | `-mono_aot`, `-mono_fullaot` | ❌ (Linux/macOS only) | ✅ | | `-runtests` | ❌ (Windows: run manually via `run.cmd`) | ✅ | | `-MSBuild` | ✅ | Use `-ninja false` via common framework | | `-PDB` | ✅ (Windows-only PDB format) | ❌ (not applicable) | > [!NOTE] > This PR was generated by GitHub Copilot. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: davidwrighton <10779849+davidwrighton@users.noreply.github.com> Co-authored-by: David Wrighton <davidwr@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 63e0510 commit 10c9a33

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

src/tests/build.cmd

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,15 @@ echo All arguments are optional and case-insensitive, and the '-' prefix is opti
355355
echo.
356356
echo.-? -h --help: View this message.
357357
echo.
358-
echo Build architecture: one of "x64", "x86", "arm64" ^(default: x64^).
358+
echo Build architecture: one of "x64", "x86", "arm64", "wasm" ^(default: x64^).
359359
echo Build type: one of "Debug", "Checked", "Release" ^(default: Debug^).
360360
echo.
361+
echo Build target OS options:
362+
echo os ^<value^>: Set the target OS. Common values: windows ^(default^), linux, osx, android,
363+
echo ios, iossimulator, tvos, tvossimulator, maccatalyst, browser, wasi.
364+
echo browser: Shorthand for "os browser" ^(typically combine with "wasm", for example "wasm browser"^).
365+
echo wasi: Shorthand for "os wasi" ^(typically combine with "wasm", for example "wasm wasi"^).
366+
echo.
361367
echo -Rebuild: Clean up all test artifacts prior to building tests.
362368
echo -SkipRestorePackages: Skip package restore.
363369
echo -SkipManaged: Skip the managed tests build.
@@ -374,6 +380,7 @@ echo -NativeAOT: Builds the tests for Native AOT compilation.
374380
echo -Perfmap: Emit perfmap symbol files when compiling the framework assemblies using Crossgen2.
375381
echo -AllTargets: Build managed tests for all target platforms (including test projects in which CLRTestTargetUnsupported resolves to true).
376382
echo -ExcludeMonoFailures, Mono: Build the tests for the Mono runtime honoring mono-specific issues.
383+
echo -CoreCLR: Build tests targeting the CoreCLR runtime (default; opposite of -Mono/-ExcludeMonoFailures).
377384
echo.
378385
echo Set to "" to disable default exclusion file.
379386
echo -Priority ^<N^> : specify a set of tests that will be built and run, with priority N.

src/tests/build.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ build_Tests()
136136
usage_list=()
137137
usage_list+=("All arguments are optional and the '-' prefix is optional. The options are:")
138138
usage_list+=("")
139+
usage_list+=("Build target OS: Use '-os <value>' (handled by the common build framework) to specify the")
140+
usage_list+=(" target OS. Common values: linux (default on Linux), osx (default on macOS), android,")
141+
usage_list+=(" ios, iossimulator, tvos, tvossimulator, maccatalyst, browser, wasi.")
142+
usage_list+=(" For mobile/device targets (android, ios, iossimulator, tvos, tvossimulator), this script")
143+
usage_list+=(" automatically skips building native test components.")
144+
usage_list+=("")
139145
usage_list+=("-rebuild - Clean up all test artifacts prior to building tests.")
140146
usage_list+=("-skiprestorepackages - Skip package restore.")
141147
usage_list+=("-skipmanaged - Skip the managed tests build.")
@@ -154,12 +160,13 @@ usage_list+=("-allTargets - Build managed tests for all target platforms (includ
154160
usage_list+=("")
155161
usage_list+=("-runtests - Run tests after building them.")
156162
usage_list+=("-mono, -excludemonofailures - Build the tests for the Mono runtime honoring mono-specific issues.")
163+
usage_list+=("-coreclr - Build tests targeting the CoreCLR runtime (default; opposite of -mono/-excludemonofailures).")
157164
usage_list+=("-mono_aot - Use Mono AOT mode.")
158165
usage_list+=("-mono_fullaot - Use Mono Full AOT mode.")
159166
usage_list+=("")
160-
usage_list+=("-test:xxx - Only build the specified test project ^(relative or absolute project path under src\tests^).");
161-
usage_list+=("-dir:xxx - Build all test projects in the given directory ^(relative or absolute directory under src\tests^).");
162-
usage_list+=("-tree:xxx - Build all test projects in the given subtree ^(relative or absolute directory under src\tests^).");
167+
usage_list+=("-test:xxx - Only build the specified test project (relative or absolute project path under src/tests).")
168+
usage_list+=("-dir:xxx - Build all test projects in the given directory (relative or absolute directory under src/tests).")
169+
usage_list+=("-tree:xxx - Build all test projects in the given subtree (relative or absolute directory under src/tests).")
163170
usage_list+=("-log:xxx - Base file name to use for log files (used in lab pipelines that build tests in multiple steps to retain logs for each step).")
164171
usage_list+=("")
165172
usage_list+=("Any unrecognized arguments will be passed directly to MSBuild.")

0 commit comments

Comments
 (0)