Skip to content

Commit 080d82e

Browse files
authored
Selective integration of CoreCLR PR #27836 (#25)
1 parent f66fe24 commit 080d82e

File tree

11 files changed

+29
-30
lines changed

11 files changed

+29
-30
lines changed

eng/helixcorefxtests.proj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
TODO: ProjectDir, RootBinDir, TestWorkingDir, and TargetsWindows are global properties set in dir.props, remove the property assignment here when we port to arcade.
8686
-->
8787
<ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)..\</ProjectDir>
88+
<ProjectDir Condition="Exists('$(ProjectDir).dotnet-runtime-placeholder')">$(ProjectDir)\src\coreclr\</ProjectDir>
8889
<RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
8990
<TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(__BuildOS).$(__BuildArch).$(__BuildType)\</TestWorkingDir>
9091
<TargetsWindows Condition="'$(__BuildOS)' == 'Windows_NT'">true</TargetsWindows>
@@ -149,7 +150,7 @@
149150
</PropertyGroup>
150151

151152
<ItemGroup>
152-
<_ProjectsToBuild Include="..\tests\testenvironment.proj">
153+
<_ProjectsToBuild Include="$(ProjectDir)tests\testenvironment.proj">
153154
<Properties>Scenario=$(Scenario);TestEnvFileName=$(TestEnvFilePath);TargetsWindows=$(TargetsWindows)</Properties>
154155
</_ProjectsToBuild>
155156
</ItemGroup>

eng/pipelines/coreclr/templates/build-test-job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
displayName: Install native dependencies
6868
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
6969
# Necessary to install correct cmake version
70-
- script: $(coreClrRepoRootDir)eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
70+
- script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
7171
displayName: Install native dependencies
7272

7373

eng/pipelines/coreclr/templates/crossgen-comparison-job.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
value: $(osGroup).$(hostArchType)_$(archType).$(buildConfigUpper)
4141
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
4242
- name: binDirectory
43-
value: $(Build.SourcesDirectory)/bin
43+
value: $(coreClrRepoRoot)/bin
4444
- name: productDirectory
45-
value: $(Build.SourcesDirectory)/bin/Product
45+
value: $(binDirectory)/Product
4646
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
4747
- name: binDirectory
48-
value: $(Build.SourcesDirectory)\bin
48+
value: $(coreClrRepoRoot)\bin
4949
- name: productDirectory
50-
value: $(Build.SourcesDirectory)\bin\Product
50+
value: $(binDirectory\Product
5151

5252
# Test job depends on the corresponding build job
5353
dependsOn: ${{ format('build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
@@ -83,20 +83,16 @@ jobs:
8383
8484
8585
# Populate Core_Root
86-
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
87-
- script: ./build-test.sh $(buildConfig) $(archType) $(crossArg) generatelayoutonly
88-
displayName: Populate Core_Root
89-
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
90-
- script: build-test.cmd $(buildConfig) $(archType) generateLayoutOnly
91-
displayName: Populate Core_Root
86+
- script: $(coreClrRepoRootDir)build-test$(scriptExt) $(buildConfig) $(archType) $(crossArg) generatelayoutonly
87+
displayName: Populate Core_Root
9288

9389

9490
# Create baseline output on the host (x64) machine
9591
- task: PythonScript@0
9692
displayName: Create cross-platform crossgen baseline
9793
inputs:
9894
scriptSource: 'filePath'
99-
scriptPath: $(Build.SourcesDirectory)/tests/scripts/crossgen_comparison.py
95+
scriptPath: $(coreClrRepoRoot)/tests/scripts/crossgen_comparison.py
10096
${{ if ne(parameters.osGroup, 'Windows_NT') }}:
10197
arguments:
10298
crossgen_framework
@@ -126,7 +122,7 @@ jobs:
126122
Creator: $(Creator)
127123
WorkItemTimeout: 1:00 # 1 hour
128124
WorkItemDirectory: '$(binDirectory)'
129-
CorrelationPayloadDirectory: '$(Build.SourcesDirectory)/tests/scripts'
125+
CorrelationPayloadDirectory: '$(coreClrRepoRoot)/tests/scripts'
130126
${{ if ne(parameters.osName, 'Windows_NT') }}:
131127
WorkItemCommand:
132128
chmod +x $HELIX_WORKITEM_PAYLOAD/Product/$(targetFlavor)/crossgen;

eng/pipelines/coreclr/templates/perf-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ jobs:
5555

5656
# Create Core_Root
5757
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
58-
- script: ./build-test.sh ${{ parameters.buildConfig }} ${{ parameters.archType }} generatelayoutonly
58+
- script: $(coreClrRepoRootDir)build-test$(scriptExt) ${{ parameters.buildConfig }} ${{ parameters.archType }} generatelayoutonly
5959
displayName: Create Core_Root
6060
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
6161
# TODO: add generatelayoutonly to build-test.cmd.
62-
- script: build-test.cmd ${{ parameters.buildConfig }} ${{ parameters.archType }} skipmanaged skipnative
62+
- script: $(coreClrRepoRootDir)build-test$(scriptExt) ${{ parameters.buildConfig }} ${{ parameters.archType }} skipmanaged skipnative
6363
displayName: Create Core_Root

eng/pipelines/coreclr/templates/run-test-job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ jobs:
250250

251251
# Choose which tests to send to Helix: CoreFX or CoreCLR.
252252
${{ if eq(parameters.corefxTests, true) }}:
253-
helixProjectArguments: '$(coreClrRepoRoot)/eng/helixcorefxtests.proj'
253+
helixProjectArguments: '$(Build.SourcesDirectory)/eng/helixcorefxtests.proj'
254254
${{ if ne(parameters.corefxTests, true) }}:
255255
helixProjectArguments: '$(coreClrRepoRoot)/tests/src/helixpublishwitharcade.proj'
256256

eng/pipelines/coreclr/templates/xplat-pipeline-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ jobs:
8080
value: '/'
8181

8282
- name: coreClrRepoRoot
83-
value: '$(Build.SourcesDirectory)/src/coreclr
83+
value: '$(Build.SourcesDirectory)/src/coreclr'
8484

85-
- ${{ if not(startsWith(variables['Build.DefinitionName'], 'runtime')) }}:'
85+
- ${{ if not(startsWith(variables['Build.DefinitionName'], 'runtime')) }}:
8686

8787
- name: coreClrRepoRoot
8888
value: '$(Build.SourcesDirectory)'

src/coreclr/build-test.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ if "%__SkipRestorePackages%" == "1" goto SkipRestoreProduct
276276
echo %__MsgPrefix%Restoring CoreCLR product from packages
277277

278278
if not defined XunitTestBinBase set XunitTestBinBase=%__TestBinDir%
279-
set "CORE_ROOT=%XunitTestBinBase%\Tests\Core_Root"
279+
set "CORE_ROOT=%XunitTestBinBase%\Tests\Core_Root\"
280280

281281
set __BuildLogRootName=Restore_Product
282282
set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log

src/coreclr/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ build_native()
235235
__versionSourceFile="$intermediatesForBuild/version.c"
236236
if [ $__SkipGenerateVersion == 0 ]; then
237237
pwd
238-
"$__RepoRootDir/eng/common/msbuild.sh" $__ArcadeScriptArgs $__ProjectRoot/eng/empty.csproj \
238+
"$__RepoRootDir/eng/common/msbuild.sh" $__ArcadeScriptArgs $__RepoRootDir/eng/empty.csproj \
239239
/p:NativeVersionFile=$__versionSourceFile \
240240
/t:GenerateNativeVersionFile /restore \
241241
$__CommonMSBuildArgs $__UnprocessedBuildArgs

src/coreclr/tests/runtest.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ set "__TestWorkingDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildTyp
118118
:: Default global test environment variables
119119
:: REVIEW: are these ever expected to be defined on entry to this script? Why? By whom?
120120
:: REVIEW: XunitTestReportDirBase is not used in this script. Who needs to have it set?
121-
if not defined XunitTestBinBase set XunitTestBinBase=%__TestWorkingDir%
121+
if not defined XunitTestBinBase set XunitTestBinBase=%__TestWorkingDir%\
122122
if not defined XunitTestReportDirBase set XunitTestReportDirBase=%XunitTestBinBase%\Reports\
123123

124124
REM At this point in the script there will be a divergence in how the tests are run.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
cmake_minimum_required (VERSION 2.6)
2-
project (ReversePInvokePassingByOutNative)
2+
project (RPIP_ByOutNative)
33
include ("${CLR_INTEROP_TEST_ROOT}/Interop.cmake")
44
include_directories("..")
55
set(SOURCES
66
ReversePInvokePassingByOutNative.cpp
77
)
88
# Additional files to reference:
99
# add the executable
10-
add_library (ReversePInvokePassingByOutNative SHARED ${SOURCES})
11-
target_link_libraries(ReversePInvokePassingByOutNative ${LINK_LIBRARIES_ADDITIONAL})
10+
add_library (RPIP_ByOutNative SHARED ${SOURCES})
11+
set_property (TARGET RPIP_ByOutNative PROPERTY OUTPUT_NAME ReversePInvokePassingByOutNative)
12+
target_link_libraries(RPIP_ByOutNative ${LINK_LIBRARIES_ADDITIONAL})
1213
# add the install targets
13-
install (TARGETS ReversePInvokePassingByOutNative DESTINATION bin)
14+
install (TARGETS RPIP_ByOutNative DESTINATION bin)
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
cmake_minimum_required (VERSION 2.6)
2-
project (ReversePInvokePassingByRefNative)
2+
project (RPIP_ByRefNative)
33
include ("${CLR_INTEROP_TEST_ROOT}/Interop.cmake")
44
include_directories("..")
55
set(SOURCES
66
ReversePInvokePassingByRefNative.cpp
77
)
88
# Additional files to reference:
99
# add the executable
10-
add_library (ReversePInvokePassingByRefNative SHARED ${SOURCES})
11-
target_link_libraries(ReversePInvokePassingByRefNative ${LINK_LIBRARIES_ADDITIONAL})
10+
add_library (RPIP_ByRefNative SHARED ${SOURCES})
11+
set_property (TARGET RPIP_ByRefNative PROPERTY OUTPUT_NAME ReversePInvokePassingByRefNative)
12+
target_link_libraries(RPIP_ByRefNative ${LINK_LIBRARIES_ADDITIONAL})
1213
# add the install targets
13-
install (TARGETS ReversePInvokePassingByRefNative DESTINATION bin)
14+
install (TARGETS RPIP_ByRefNative DESTINATION bin)

0 commit comments

Comments
 (0)