Skip to content

Commit 53a1ddc

Browse files
authored
Pass runtime flavor args when copying native test components in CI (#57073)
* Pass runtime flavor args when copying native test components in CI * Make test build script pass RuntimeFlavor property
1 parent c97cf0c commit 53a1ddc

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

eng/pipelines/common/templates/runtimes/run-test-job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ jobs:
267267
# and directly unzip them there after download). Unfortunately the logic to copy
268268
# the native artifacts to the final test folders is dependent on availability of the
269269
# managed test artifacts.
270-
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) copynativeonly $(crossgenArg) $(buildConfig) $(archType) $(priorityArg) $(librariesOverrideArg)
270+
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) copynativeonly $(runtimeFlavorArgs) $(crossgenArg) $(buildConfig) $(archType) $(priorityArg) $(librariesOverrideArg)
271271
displayName: Copy native test components to test output folder
272272

273273

src/tests/build.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ for /l %%G in (1, 1, %__NumberOfTestGroups%) do (
376376
)
377377
) else (
378378
set __MSBuildBuildArgs=!__RepoRootDir!\src\tests\build.proj -warnAsError:0 /nodeReuse:false !__Logging! !TargetsWindowsMsbuildArg! !__msbuildArgs! !__PriorityArg! !__BuildNeedTargetArg! !__NativeBinariesLayoutTypeArg! !__UnprocessedBuildArgs! "/t:CopyAllNativeProjectReferenceBinaries"
379+
set __MSBuildBuildArgs=!__MSBuildBuildArgs! /p:RuntimeFlavor=!__RuntimeFlavor!
379380
echo Running: msbuild !__MSBuildBuildArgs!
380381
!__CommonMSBuildCmdPrefix! !__MSBuildBuildArgs!
381382

src/tests/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ build_Tests()
299299
if [[ "$__CopyNativeTestBinaries" == 1 ]]; then
300300
echo "Copying native test binaries to output..."
301301

302-
build_MSBuild_projects "Tests_Managed" "$__RepoRootDir/src/tests/build.proj" "Managed tests build (build tests)" "/t:CopyAllNativeProjectReferenceBinaries" "/bl:${__RepoRootDir}/artifacts/log/${__BuildType}/copy_native_test_binaries${__RuntimeFlavor}.binlog"
302+
build_MSBuild_projects "Tests_Managed" "$__RepoRootDir/src/tests/build.proj" "Managed tests build (build tests)" "/p:RuntimeFlavor=$__RuntimeFlavor" "/t:CopyAllNativeProjectReferenceBinaries" "/bl:${__RepoRootDir}/artifacts/log/${__BuildType}/copy_native_test_binaries${__RuntimeFlavor}.binlog"
303303

304304
if [[ "$?" -ne 0 ]]; then
305305
echo "${__ErrMsgPrefix}${__MsgPrefix}Error: copying native test binaries failed. Refer to the build log files for details (above)"

0 commit comments

Comments
 (0)