Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd4c637d

Browse files
authored
re-enable FSharp.Core unit tests (#3014)
* add library-only build and test* fix tests* Fix tests
1 parent45f6878 commitd4c637d

File tree

8 files changed

+69
-5
lines changed

8 files changed

+69
-5
lines changed

‎build-everything.proj‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33

44
<!-- +++++++++++++++++++++++ Project selection for building +++++++++++++++++++++++++++++++-->
55

6-
<ItemGroupCondition="'$(BUILD_NET40)'=='1'">
6+
<ItemGroupCondition="'$(BUILD_NET40_FSHARP_CORE)'=='1'">
77
<ProjectsWithNet40Include="src/fsharp/FSharp.Core/FSharp.Core.fsproj" />
8+
</ItemGroup>
9+
10+
<ItemGroupCondition="'$(BUILD_NET40)'=='1'">
811
<ProjectsWithNet40Include="src/fsharp/FSharp.Build/FSharp.Build.fsproj" />
912
<ProjectsWithNet40Include="src/fsharp/FSharp.Compiler/FSharp.Compiler.fsproj" />
1013
<ProjectsWithNet40Include="src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj"/>

‎build.cmd‎

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ if "%BUILD_PROTO_WITH_CORECLR_LKG%" =="" (set BUILD_PROTO_WITH_CORECLR_LKG=0)
5757
setBUILD_PROTO=0
5858
setBUILD_PHASE=1
5959
setBUILD_NET40=0
60+
setBUILD_NET40_FSHARP_CORE=0
6061
setBUILD_CORECLR=0
6162
setBUILD_PORTABLE=0
6263
setBUILD_VS=0
@@ -94,10 +95,15 @@ for %%i in (%BUILD_FSC_DEFAULT%) do ( call :PROCESS_ARG %%i )
9495
REM apply defaults
9596

9697
if /i"%_autoselect%"=="1" (
98+
setBUILD_NET40_FSHARP_CORE=1
9799
setBUILD_NET40=1
98100
)
99101

100102
if /i"%_autoselect_tests%"=="1" (
103+
if /i"%BUILD_NET40_FSHARP_CORE%"=="1" (
104+
setTEST_NET40_COREUNIT_SUITE=1
105+
)
106+
101107
if /i"%BUILD_NET40%"=="1" (
102108
setTEST_NET40_COMPILERUNIT_SUITE=1
103109
setTEST_NET40_COREUNIT_SUITE=1
@@ -129,8 +135,14 @@ set ARG2=%~2
129135
if"%ARG%"=="1"if"%2"=="" (set ARG=default)
130136
if"%2"==""ifnot"%ARG%"=="default"goto :EOF
131137

138+
if /i"%ARG%"=="net40-lib" (
139+
set_autoselect=0
140+
setBUILD_NET40_FSHARP_CORE=1
141+
)
142+
132143
if /i"%ARG%"=="net40" (
133144
set_autoselect=0
145+
setBUILD_NET40_FSHARP_CORE=1
134146
setBUILD_NET40=1
135147
)
136148

@@ -174,6 +186,7 @@ if /i "%ARG%" == "microbuild" (
174186
set_autoselect=0
175187
setBUILD_PROTO=1
176188
setBUILD_NET40=1
189+
setBUILD_NET40_FSHARP_CORE=1
177190
setBUILD_PROTO_WITH_CORECLR_LKG=1
178191
setBUILD_CORECLR=1
179192
setBUILD_PORTABLE=1
@@ -203,6 +216,7 @@ if /i "%ARG%" == "ci_part1" (
203216
REM what we do
204217
setBUILD_PROTO=1
205218
setBUILD_NET40=1
219+
setBUILD_NET40_FSHARP_CORE=1
206220
setBUILD_PORTABLE=1
207221
setBUILD_VS=1
208222
setBUILD_SETUP=%FSC_BUILD_SETUP%
@@ -216,6 +230,7 @@ if /i "%ARG%" == "ci_part2" (
216230
REM what we do
217231
setBUILD_PROTO=1
218232
setBUILD_NET40=1
233+
setBUILD_NET40_FSHARP_CORE=1
219234

220235
setTEST_NET40_COREUNIT_SUITE=1
221236
setTEST_NET40_FSHARP_SUITE=1
@@ -241,6 +256,7 @@ if /i "%ARG%" == "ci_part4" (
241256
REM what we do
242257
setBUILD_PROTO=1
243258
setBUILD_NET40=1
259+
setBUILD_NET40_FSHARP_CORE=1
244260
setBUILD_PORTABLE=1
245261

246262
setTEST_NET40_COMPILERUNIT_SUITE=1
@@ -282,6 +298,7 @@ if /i "%ARG%" == "test-all" (
282298
setBUILD_PROTO=1
283299
setBUILD_PROTO_WITH_CORECLR_LKG=1
284300
setBUILD_NET40=1
301+
setBUILD_NET40_FSHARP_CORE=1
285302
setBUILD_CORECLR=1
286303
setBUILD_PORTABLE=1
287304
setBUILD_VS=1
@@ -297,47 +314,60 @@ if /i "%ARG%" == "test-all" (
297314
)
298315

299316
if /i"%ARG%"=="test-net40-fsharpqa" (
317+
set_autoselect=0
300318
setBUILD_NET40=1
319+
setBUILD_NET40_FSHARP_CORE=1
301320
setBUILD_PORTABLE=1
302321
setTEST_NET40_FSHARPQA_SUITE=1
303322
)
304323

305324
if /i"%ARG%"=="test-compiler-unit" (
325+
set_autoselect=0
306326
setBUILD_NET40=1
327+
setBUILD_NET40_FSHARP_CORE=1
307328
setTEST_NET40_COMPILERUNIT_SUITE=1
308329
)
309330

310331
if /i"%ARG%"=="test-net40-ideunit" (
332+
set_autoselect=0
311333
setBUILD_NET40=1
334+
setBUILD_NET40_FSHARP_CORE=1
312335
setBUILD_VS=1
313336
setBUILD_PORTABLE=1
314337
setTEST_VS_IDEUNIT_SUITE=1
315338
)
316339

317340
if /i"%ARG%"=="test-net40-coreunit" (
318-
setBUILD_NET40=1
341+
set_autoselect=0
342+
setBUILD_NET40_FSHARP_CORE=1
319343
setTEST_NET40_COREUNIT_SUITE=1
320344
)
321345

322346
if /i"%ARG%"=="test-coreclr-coreunit" (
347+
set_autoselect=0
323348
setBUILD_PROTO_WITH_CORECLR_LKG=1
324349
setBUILD_CORECLR=1
325350
setTEST_CORECLR_COREUNIT_SUITE=1
326351
)
327352

328353
if /i"%ARG%"=="test-pcl-coreunit" (
354+
set_autoselect=0
329355
setBUILD_PORTABLE=1
330356
setTEST_PORTABLE_COREUNIT_SUITE=1
331357
)
332358

333359
if /i"%ARG%"=="test-net40-fsharp" (
360+
set_autoselect=0
334361
setBUILD_NET40=1
362+
setBUILD_NET40_FSHARP_CORE=1
335363
setBUILD_PORTABLE=1
336364
setTEST_NET40_FSHARP_SUITE=1
337365
)
338366

339367
if /i"%ARG%"=="test-coreclr-fsharp" (
368+
set_autoselect=0
340369
setBUILD_NET40=1
370+
setBUILD_NET40_FSHARP_CORE=1
341371
setBUILD_PROTO_WITH_CORECLR_LKG=1
342372
setBUILD_CORECLR=1
343373
setTEST_CORECLR_FSHARP_SUITE=1
@@ -370,6 +400,7 @@ echo.
370400
echo BUILD_PROTO=%BUILD_PROTO%
371401
echo BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG%
372402
echo BUILD_NET40=%BUILD_NET40%
403+
echo BUILD_NET40_FSHARP_CORE=%BUILD_NET40_FSHARP_CORE%
373404
echo BUILD_CORECLR=%BUILD_CORECLR%
374405
echo BUILD_PORTABLE=%BUILD_PORTABLE%
375406
echo BUILD_VS=%BUILD_VS%
@@ -595,7 +626,7 @@ if "%BUILD_PHASE%" == "1" (
595626

596627
echo ---------------- Done with build, starting update/prepare ---------------
597628

598-
if"%BUILD_NET40%"=="1" (
629+
if"%BUILD_NET40_FSHARP_CORE%"=="1" (
599630
call src\update.cmd%BUILD_CONFIG% -ngen
600631
)
601632

@@ -646,7 +677,7 @@ echo SNEXE64: %SNEXE64%
646677
echo ILDASM:%ILDASM%
647678
echo
648679

649-
if"%TEST_NET40_COMPILERUNIT_SUITE%"=="0"if"%TEST_PORTABLE_COREUNIT_SUITE%"=="0"if"%TEST_CORECLR_COREUNIT_SUITE%"=="0"if"%TEST_VS_IDEUNIT_SUITE%"=="0"if"%TEST_NET40_FSHARP_SUITE%"=="0"if"%TEST_NET40_FSHARPQA_SUITE%"=="0"goto :success
680+
if"%TEST_NET40_COMPILERUNIT_SUITE%"=="0"if"%TEST_NET40_COREUNIT_SUITE%"=="0"if"%TEST_PORTABLE_COREUNIT_SUITE%"=="0"if"%TEST_CORECLR_COREUNIT_SUITE%"=="0"if"%TEST_VS_IDEUNIT_SUITE%"=="0"if"%TEST_NET40_FSHARP_SUITE%"=="0"if"%TEST_NET40_FSHARPQA_SUITE%"=="0"goto :success
650681

651682
echo ---------------- Done with update, starting tests -----------------------
652683

‎build.sh‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ fi
8181

8282
export BUILD_PROTO=0
8383
export BUILD_PHASE=1
84+
export BUILD_NET40_FSHARP_CORE=0
8485
export BUILD_NET40=0
8586
export BUILD_CORECLR=0
8687
export BUILD_PORTABLE=0
@@ -114,6 +115,7 @@ do
114115
"net40")
115116
_autoselect=0
116117
export BUILD_NET40=1
118+
export BUILD_NET40_FSHARP_CORE=1
117119
;;
118120
"coreclr")
119121
_autoselect=0
@@ -127,6 +129,7 @@ do
127129
"vs")
128130
_autoselect=0
129131
export BUILD_NET40=1
132+
export BUILD_NET40_FSHARP_CORE=1
130133
export BUILD_VS=1
131134
;;
132135
"vstest")
@@ -140,6 +143,7 @@ do
140143
export BUILD_PROTO=1
141144
export BUILD_PROTO_WITH_CORECLR_LKG=1
142145
export BUILD_NET40=1
146+
export BUILD_NET40_FSHARP_CORE=1
143147
export BUILD_CORECLR=1
144148
export BUILD_PORTABLE=1
145149
export BUILD_VS=1
@@ -150,6 +154,7 @@ do
150154
_autoselect=0
151155
export BUILD_PROTO=1
152156
export BUILD_NET40=1
157+
export BUILD_NET40_FSHARP_CORE=1
153158
export BUILD_PROTO_WITH_CORECLR_LKG=1
154159
export BUILD_CORECLR=1
155160
export BUILD_PORTABLE=1
@@ -174,6 +179,7 @@ do
174179
# what we do
175180
export BUILD_PROTO=1
176181
export BUILD_NET40=1
182+
export BUILD_NET40_FSHARP_CORE=1
177183
export BUILD_PORTABLE=1
178184
export BUILD_VS=1
179185
export BUILD_SETUP=$FSC_BUILD_SETUP
@@ -189,6 +195,7 @@ do
189195
export BUILD_PROTO_WITH_CORECLR_LKG=1
190196
export BUILD_PROTO=1
191197
export BUILD_NET40=1
198+
export BUILD_NET40_FSHARP_CORE=1
192199
export BUILD_PORTABLE=1
193200

194201
export TEST_NET40_COREUNIT_SUITE=1
@@ -203,6 +210,7 @@ do
203210
export BUILD_PROTO_WITH_CORECLR_LKG=1
204211
export BUILD_PROTO=1
205212
export BUILD_NET40=1
213+
export BUILD_NET40_FSHARP_CORE=1
206214
export BUILD_CORECLR=1
207215

208216
export TEST_CORECLR_FSHARP_SUITE=1
@@ -248,6 +256,7 @@ do
248256
export BUILD_PROTO=1
249257
export BUILD_PROTO_WITH_CORECLR_LKG=1
250258
export BUILD_NET40=1
259+
export BUILD_NET40_FSHARP_CORE=1
251260
export BUILD_CORECLR=1
252261
export BUILD_PORTABLE=1
253262
export BUILD_VS=1
@@ -263,15 +272,17 @@ do
263272
;;
264273
"test-net40-fsharpqa")
265274
export BUILD_NET40=1
275+
export BUILD_NET40_FSHARP_CORE=1
266276
export BUILD_PORTABLE=1
267277
export TEST_NET40_FSHARPQA_SUITE=1
268278
;;
269279
"test-compiler-unit")
270280
export BUILD_NET40=1
281+
export BUILD_NET40_FSHARP_CORE=1
271282
export TEST_NET40_COMPILERUNIT_SUITE=1
272283
;;
273284
"test-net40-coreunit")
274-
exportBUILD_NET40=1
285+
exportBUILD_NET40_FSHARP_CORE=1
275286
export TEST_NET40_COREUNIT_SUITE=1
276287
;;
277288
"test-coreclr-coreunit")
@@ -285,11 +296,13 @@ do
285296
;;
286297
"test-net40-fsharp")
287298
export BUILD_NET40=1
299+
export BUILD_NET40_FSHARP_CORE=1
288300
export BUILD_PORTABLE=1
289301
export TEST_NET40_FSHARP_SUITE=1
290302
;;
291303
"test-coreclr-fsharp")
292304
export BUILD_NET40=1
305+
export BUILD_NET40_FSHARP_CORE=1
293306
export BUILD_PROTO_WITH_CORECLR_LKG=1
294307
export BUILD_CORECLR=1
295308
export TEST_CORECLR_FSHARP_SUITE=1
@@ -310,6 +323,7 @@ done
310323
# Apply defaults, if necessary.
311324
if [$_autoselect-eq 1 ];then
312325
export BUILD_NET40=1
326+
export BUILD_NET40_FSHARP_CORE=1
313327
fi
314328

315329
if [$_autoselect_tests-eq 1 ];then
@@ -322,6 +336,7 @@ if [ $_autoselect_tests -eq 1 ]; then
322336

323337
if [$BUILD_CORECLR-eq 1 ];then
324338
export BUILD_NET40=1
339+
export BUILD_NET40_FSHARP_CORE=1
325340
export TEST_CORECLR_FSHARP_SUITE=1
326341
export TEST_CORECLR_COREUNIT_SUITE=1
327342
fi
@@ -344,6 +359,7 @@ printf "\n"
344359
printf"BUILD_PROTO=%s\n""$BUILD_PROTO"
345360
printf"BUILD_PROTO_WITH_CORECLR_LKG=%s\n""$BUILD_PROTO_WITH_CORECLR_LKG"
346361
printf"BUILD_NET40=%s\n""$BUILD_NET40"
362+
printf"BUILD_NET40_FSHARP_CORE=%s\n""$BUILD_NET40_FSHARP_CORE"
347363
printf"BUILD_CORECLR=%s\n""$BUILD_CORECLR"
348364
printf"BUILD_PORTABLE=%s\n""$BUILD_PORTABLE"
349365
printf"BUILD_VS=%s\n""$BUILD_VS"

‎mono/build.bat‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ if not exist %_ngenexe% echo Note: Could not find ngen.exe.
2121
%_ngenexe% install packages\FSharp.Compiler.Tools.4.0.1.21\tools\fsc.exe
2222

2323
setBUILD_NET40=1
24+
setBUILD_NET40_FSHARP_CORE=1
2425
setBUILD_PORTABLE=1
2526
setTEST_NET40_COREUNIT_SUITE=1
2627
setTEST_PORTABLE_COREUNIT_SUITE=1

‎src/FSharpSource.targets‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
<Choose>
2727
<WhenCondition="'$(ProjectLanguage)' == 'FSharp'">
2828
<Choose>
29+
<!-- Some unit test assemblies must not have strong names since they reference other assemblies that don't have strong names-->
30+
<!-- These unit test assemblies can't use InternalsVisibleTo into assemblies with strong names.-->
31+
<WhenCondition="'$(StrongNames)' == 'false'" >
32+
<PropertyGroup>
33+
<SkipSigning>true</SkipSigning>
34+
<UseOpenSourceSign>false</UseOpenSourceSign>
35+
<MicroBuildAssemblyVersion>$(FSCoreVersion)</MicroBuildAssemblyVersion>
36+
<MicroBuildAssemblyFileLanguage>fs</MicroBuildAssemblyFileLanguage>
37+
</PropertyGroup>
38+
</When>
2939
<!-- In the open source "Mono" build we always fully sign the binaries with the public test.snk, apart from FSharp.Core, which gets the MSFT key-->
3040
<WhenCondition="'$(MonoPackaging)' == 'true' AND '$(AssemblyName)'!='FSharp.Core'" >
3141
<PropertyGroup>

‎src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<AllowCrossTargeting>true</AllowCrossTargeting>
1616
<ReferenceVsAssemblies>true</ReferenceVsAssemblies>
1717
<OutputType>Library</OutputType>
18+
<StrongNames>false</StrongNames>
1819
<AssemblyName>FSharp.Core.Unittests</AssemblyName>
1920
<!-- Prevent compiler from inlining calls to FSharp.Core to improve code coverage accuracy-->
2021
<Optimize>false</Optimize>

‎src/fsharp/FSharp.Core.Unittests/StructTuples.fs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,4 @@ type StructTuplesCSharpInterop() =
141141
Assert.IsTrue((one=1)&&(two=2)&&(three=3)&&(four=4)&&(five=5)&&(six=6)&&(seven=7)&&(eight=8)&&(nine=9)&&(ten=10)&&(eleven=11)&&(twelve=12)&&(thirteen=13)&&(fourteen=14)&&(fifteen=15)&&(sixteen=16))
142142
()
143143
#endif
144+

‎src/fsharp/FSharp.Core/array2.fsi‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,4 @@ namespace Microsoft.FSharp.Collections
226226
[<CompiledName("Get")>]
227227
valget:array:'T[,]->index1:int->index2:int->'T
228228

229+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp