Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'standalone' option when building tests for ilasm roundtrip #93037

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions eng/pipelines/common/templates/runtimes/build-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ jobs:
displayName: Disk Usage before Build

# Build managed test components
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)Managed allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) $(testTreeFilterArg) ci /p:TargetOS=AnyOS
displayName: Build managed test components
- ${{ if in(parameters.testGroup, 'ilasm') }}:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)Managed allTargets skipnative skipgeneratelayout standalone skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) $(testTreeFilterArg) ci /p:TargetOS=AnyOS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should create an $(ilasm) so that you don't duplicate the entire script line. It will be easy for this to go stale.

displayName: Build managed test components for ilasm
- ${{ else }}:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)Managed allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) $(testTreeFilterArg) ci /p:TargetOS=AnyOS
displayName: Build managed test components

- ${{ if in(parameters.osGroup, 'osx', 'ios', 'tvos') }}:
- script: |
Expand Down
2 changes: 2 additions & 0 deletions src/tests/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ if /i "%arg%" == "SkipManaged" (set __SkipManaged=1&set processedArgs=
if /i "%arg%" == "SkipNative" (set __SkipNative=1&set __CopyNativeProjectsAfterCombinedTestBuild=false&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%arg%" == "SkipTestWrappers" (set __SkipTestWrappers=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%arg%" == "SkipGenerateLayout" (set __SkipGenerateLayout=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%arg%" == "Standalone" (set BuildAsStandalone=true&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)

if /i "%arg%" == "CopyNativeOnly" (set __CopyNativeTestBinaries=1&set __SkipNative=1&set __CopyNativeProjectsAfterCombinedTestBuild=false&set __SkipGenerateLayout=1&set __SkipTestWrappers=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%arg%" == "GenerateLayoutOnly" (set __GenerateLayoutOnly=1&set __SkipManaged=1&set __SkipNative=1&set __CopyNativeProjectsAfterCombinedTestBuild=false&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
Expand Down Expand Up @@ -382,6 +383,7 @@ echo -SkipManaged: Skip the managed tests build.
echo -SkipNative: Skip the native tests build.
echo -SkipTestWrappers: Skip generating test wrappers.
echo -SkipGenerateLayout: Skip generating the Core_Root layout.
echo -Standalone: Builds the tests as standalone exes.
echo.
echo -CopyNativeOnly: Only copy the native test binaries to the managed output. Do not build the native or managed tests.
echo -GenerateLayoutOnly: Only generate the Core_Root layout without building managed or native test components.
Expand Down
6 changes: 6 additions & 0 deletions src/tests/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ build_Tests()
export __ErrMsgPrefix
export __Exclude
export EnableNativeSanitizers
export BuildAsStandalone

# Generate build command
buildArgs=("$__RepoRootDir/src/tests/build.proj")
Expand Down Expand Up @@ -146,6 +147,7 @@ usage_list+=("-skipmanaged - Skip the managed tests build.")
usage_list+=("-skipnative - Skip the native tests build.")
usage_list+=("-skiptestwrappers - Skip generating test wrappers.")
usage_list+=("-skipgeneratelayout - Skip generating the Core_Root layout.")
usage_list+=("-standalone - Builds the tests as standalone exes.")
usage_list+=("")
usage_list+=("-copynativeonly - Only copy the native test binaries to the managed output. Do not build the native or managed tests.")
usage_list+=("-generatelayoutonly - Only generate the Core_Root layout without building managed or native test components.")
Expand Down Expand Up @@ -281,6 +283,10 @@ handle_arguments_local() {
__SkipGenerateLayout=1
;;

standalone|-standalone)
BuildAsStandalone=true
;;

excludemonofailures|-excludemonofailures)
__Mono=1
;;
Expand Down