@@ -7,7 +7,7 @@ VERSION_PREFIX=5.0
7
7
# See https://github.com/dotnet/source-build/issues/579, this version
8
8
# needs to be compatible with the runtime produced from source-build
9
9
DEV_CERTS_VERSION_DEFAULT=5.0.0-preview.3
10
- __ROOT_REPO=$( cat " $SCRIPT_ROOT /artifacts/obj/rootrepo.txt" | sed ' s/\r$// ' ) # remove CR if mounted repo on Windows drive
10
+ __ROOT_REPO=$( sed ' s/\r$// ' " $SCRIPT_ROOT /artifacts/obj/rootrepo.txt" ) # remove CR if mounted repo on Windows drive
11
11
executingUserHome=${HOME:- }
12
12
13
13
echo " RID to test: ${targetRid?not specified. Use ./ build.sh --run-smoke-test to detect RID, or specify manually.} "
@@ -91,9 +91,9 @@ while :; do
91
91
break
92
92
fi
93
93
94
- lowerI=" $( echo $1 | awk ' {print tolower($0)}' ) "
94
+ lowerI=" $( echo " $1 " | awk ' {print tolower($0)}' ) "
95
95
case $lowerI in
96
- - ? |-h|--help)
96
+ ' -? ' |-h|--help)
97
97
usage
98
98
exit 0
99
99
;;
@@ -215,7 +215,7 @@ function doCommand() {
215
215
elif [[ " $1 " == " run" && " $proj " =~ ^(web| mvc| webapi| razor| blazorwasm| blazorserver)$ ]]; then
216
216
# A separate log file that we will over-write all the time.
217
217
exitLogFile=" $testingDir /exitLogFile"
218
- echo > $exitLogFile
218
+ echo > " $exitLogFile "
219
219
# Run an application in the background and redirect its
220
220
# stdout+stderr to a separate process (tee). The tee process
221
221
# writes its input to 2 files:
@@ -245,7 +245,7 @@ function doCommand() {
245
245
elif [ " $1 " == " multi-rid-publish" ]; then
246
246
runPublishScenarios () {
247
247
" ${dotnetCmd} " publish --self-contained false /bl:" ${binlogPrefix} publish-fx-dep.binlog"
248
- " ${dotnetCmd} " publish --self-contained true -r $targetRid /bl:" ${binlogPrefix} publish-self-contained-${targetRid} .binlog"
248
+ " ${dotnetCmd} " publish --self-contained true -r " $targetRid " /bl:" ${binlogPrefix} publish-self-contained-${targetRid} .binlog"
249
249
" ${dotnetCmd} " publish --self-contained true -r linux-x64 /bl:" ${binlogPrefix} publish-self-contained-portable.binlog"
250
250
}
251
251
if [ " $projectOutput " == " true" ]; then
@@ -334,6 +334,219 @@ function runWebTests() {
334
334
doCommand F# webapi " $@ " new restore build run multi-rid-publish
335
335
}
336
336
337
+ function runXmlDocTests() {
338
+ targetingPacksDir=" $dotnetDir /packs/"
339
+ echo " Looking for xml docs in targeting packs in $targetingPacksDir "
340
+
341
+ netstandardIgnoreList=(
342
+ Microsoft.Win32.Primitives.xml
343
+ mscorlib.xml
344
+ System.AppContext.xml
345
+ System.Buffers.xml
346
+ System.Collections.Concurrent.xml
347
+ System.Collections.NonGeneric.xml
348
+ System.Collections.Specialized.xml
349
+ System.Collections.xml
350
+ System.ComponentModel.Composition.xml
351
+ System.ComponentModel.EventBasedAsync.xml
352
+ System.ComponentModel.Primitives.xml
353
+ System.ComponentModel.TypeConverter.xml
354
+ System.ComponentModel.xml
355
+ System.Console.xml
356
+ System.Core.xml
357
+ System.Data.Common.xml
358
+ System.Data.xml
359
+ System.Diagnostics.Contracts.xml
360
+ System.Diagnostics.Debug.xml
361
+ System.Diagnostics.FileVersionInfo.xml
362
+ System.Diagnostics.Process.xml
363
+ System.Diagnostics.StackTrace.xml
364
+ System.Diagnostics.TextWriterTraceListener.xml
365
+ System.Diagnostics.Tools.xml
366
+ System.Diagnostics.TraceSource.xml
367
+ System.Diagnostics.Tracing.xml
368
+ System.Drawing.Primitives.xml
369
+ System.Drawing.xml
370
+ System.Dynamic.Runtime.xml
371
+ System.Globalization.Calendars.xml
372
+ System.Globalization.Extensions.xml
373
+ System.Globalization.xml
374
+ System.IO.Compression.FileSystem.xml
375
+ System.IO.Compression.xml
376
+ System.IO.Compression.ZipFile.xml
377
+ System.IO.FileSystem.DriveInfo.xml
378
+ System.IO.FileSystem.Primitives.xml
379
+ System.IO.FileSystem.Watcher.xml
380
+ System.IO.FileSystem.xml
381
+ System.IO.IsolatedStorage.xml
382
+ System.IO.MemoryMappedFiles.xml
383
+ System.IO.Pipes.xml
384
+ System.IO.UnmanagedMemoryStream.xml
385
+ System.IO.xml
386
+ System.Linq.Expressions.xml
387
+ System.Linq.Parallel.xml
388
+ System.Linq.Queryable.xml
389
+ System.Linq.xml
390
+ System.Memory.xml
391
+ System.Net.Http.xml
392
+ System.Net.NameResolution.xml
393
+ System.Net.NetworkInformation.xml
394
+ System.Net.Ping.xml
395
+ System.Net.Primitives.xml
396
+ System.Net.Requests.xml
397
+ System.Net.Security.xml
398
+ System.Net.Sockets.xml
399
+ System.Net.WebHeaderCollection.xml
400
+ System.Net.WebSockets.Client.xml
401
+ System.Net.WebSockets.xml
402
+ System.Net.xml
403
+ System.Numerics.Vectors.xml
404
+ System.Numerics.xml
405
+ System.ObjectModel.xml
406
+ System.Reflection.DispatchProxy.xml
407
+ System.Reflection.Emit.ILGeneration.xml
408
+ System.Reflection.Emit.Lightweight.xml
409
+ System.Reflection.Emit.xml
410
+ System.Reflection.Extensions.xml
411
+ System.Reflection.Primitives.xml
412
+ System.Reflection.xml
413
+ System.Resources.Reader.xml
414
+ System.Resources.ResourceManager.xml
415
+ System.Resources.Writer.xml
416
+ System.Runtime.CompilerServices.VisualC.xml
417
+ System.Runtime.Extensions.xml
418
+ System.Runtime.Handles.xml
419
+ System.Runtime.InteropServices.RuntimeInformation.xml
420
+ System.Runtime.InteropServices.xml
421
+ System.Runtime.Numerics.xml
422
+ System.Runtime.Serialization.Formatters.xml
423
+ System.Runtime.Serialization.Json.xml
424
+ System.Runtime.Serialization.Primitives.xml
425
+ System.Runtime.Serialization.xml
426
+ System.Runtime.Serialization.Xml.xml
427
+ System.Runtime.xml
428
+ System.Security.Claims.xml
429
+ System.Security.Cryptography.Algorithms.xml
430
+ System.Security.Cryptography.Csp.xml
431
+ System.Security.Cryptography.Encoding.xml
432
+ System.Security.Cryptography.Primitives.xml
433
+ System.Security.Cryptography.X509Certificates.xml
434
+ System.Security.Principal.xml
435
+ System.Security.SecureString.xml
436
+ System.ServiceModel.Web.xml
437
+ System.Text.Encoding.Extensions.xml
438
+ System.Text.Encoding.xml
439
+ System.Text.RegularExpressions.xml
440
+ System.Threading.Overlapped.xml
441
+ System.Threading.Tasks.Extensions.xml
442
+ System.Threading.Tasks.Parallel.xml
443
+ System.Threading.Tasks.xml
444
+ System.Threading.ThreadPool.xml
445
+ System.Threading.Thread.xml
446
+ System.Threading.Timer.xml
447
+ System.Threading.xml
448
+ System.Transactions.xml
449
+ System.ValueTuple.xml
450
+ System.Web.xml
451
+ System.Windows.xml
452
+ System.xml
453
+ System.Xml.Linq.xml
454
+ System.Xml.ReaderWriter.xml
455
+ System.Xml.Serialization.xml
456
+ System.Xml.XDocument.xml
457
+ System.Xml.xml
458
+ System.Xml.XmlDocument.xml
459
+ System.Xml.XmlSerializer.xml
460
+ System.Xml.XPath.XDocument.xml
461
+ System.Xml.XPath.xml
462
+ )
463
+
464
+ netcoreappIgnoreList=(
465
+ Microsoft.VisualBasic.xml
466
+ netstandard.xml
467
+ System.AppContext.xml
468
+ System.Buffers.xml
469
+ System.ComponentModel.DataAnnotations.xml
470
+ System.Configuration.xml
471
+ System.Core.xml
472
+ System.Data.DataSetExtensions.xml
473
+ System.Data.xml
474
+ System.Diagnostics.Debug.xml
475
+ System.Diagnostics.Tools.xml
476
+ System.Drawing.xml
477
+ System.Dynamic.Runtime.xml
478
+ System.Globalization.Calendars.xml
479
+ System.Globalization.Extensions.xml
480
+ System.Globalization.xml
481
+ System.IO.Compression.FileSystem.xml
482
+ System.IO.FileSystem.Primitives.xml
483
+ System.IO.UnmanagedMemoryStream.xml
484
+ System.IO.xml
485
+ System.Net.xml
486
+ System.Numerics.xml
487
+ System.Reflection.Extensions.xml
488
+ System.Reflection.xml
489
+ System.Resources.Reader.xml
490
+ System.Resources.ResourceManager.xml
491
+ System.Runtime.Extensions.xml
492
+ System.Runtime.Handles.xml
493
+ System.Runtime.Serialization.xml
494
+ System.Security.Principal.xml
495
+ System.Security.SecureString.xml
496
+ System.Security.xml
497
+ System.ServiceModel.Web.xml
498
+ System.ServiceProcess.xml
499
+ System.Text.Encoding.xml
500
+ System.Threading.Tasks.Extensions.xml
501
+ System.Threading.Tasks.xml
502
+ System.Threading.Timer.xml
503
+ System.Transactions.xml
504
+ System.ValueTuple.xml
505
+ System.Web.xml
506
+ System.Windows.xml
507
+ System.xml
508
+ System.Xml.Linq.xml
509
+ System.Xml.Serialization.xml
510
+ System.Xml.xml
511
+ System.Xml.XmlDocument.xml
512
+ )
513
+
514
+ error=0
515
+ while IFS= read -r -d ' ' dllFile; do
516
+ xmlDocFile=${dllFile% .* } .xml
517
+ skip=0
518
+ if [[ " $xmlDocFile " == * " /packs/Microsoft.NETCore.App.Ref" * ]]; then
519
+ xmlFileBasename=$( basename " $xmlDocFile " )
520
+ for ignoreItem in " ${netcoreappIgnoreList[@]} " ; do
521
+ if [[ " $ignoreItem " == " $xmlFileBasename " ]]; then
522
+ skip=1;
523
+ break
524
+ fi
525
+ done
526
+ fi
527
+ if [[ " $xmlDocFile " == * " /packs/NETStandard.Library.Ref" * ]]; then
528
+ xmlFileBasename=$( basename " $xmlDocFile " )
529
+ for ignoreItem in " ${netstandardIgnoreList[@]} " ; do
530
+ if [[ " $ignoreItem " == " $xmlFileBasename " ]]; then
531
+ skip=1;
532
+ break
533
+ fi
534
+ done
535
+ fi
536
+ if [[ $skip == 0 ]] && [[ ! -f " $xmlDocFile " ]]; then
537
+ error=1
538
+ echo " error: missing $xmlDocFile "
539
+ fi
540
+ done < <( find " $targetingPacksDir " -name ' *.dll' -print0)
541
+
542
+ if [[ $error != 0 ]]; then
543
+ echo " error: Missing xml documents"
544
+ exit 1
545
+ else
546
+ echo " All expected xml docs are present"
547
+ fi
548
+ }
549
+
337
550
function resetCaches() {
338
551
rm -rf " $testingHome "
339
552
mkdir " $testingHome "
@@ -396,7 +609,7 @@ echo "<Project />" | tee Directory.Build.props > Directory.Build.targets
396
609
# Unzip dotnet if the dotnetDir is not specified
397
610
if [ " $dotnetDir " == " " ]; then
398
611
OUTPUT_DIR=" $SCRIPT_ROOT /artifacts/$buildArch /$configuration /"
399
- DOTNET_TARBALL=" $( ls ${OUTPUT_DIR} dotnet-sdk- ${ VERSION_PREFIX}* ) "
612
+ DOTNET_TARBALL=" $( ls " ${OUTPUT_DIR}${TARBALL_PREFIX}${ VERSION_PREFIX} " * ) "
400
613
401
614
mkdir -p " $cliDir "
402
615
tar xzf " $DOTNET_TARBALL " -C " $cliDir "
@@ -415,7 +628,7 @@ export NUGET_PACKAGES="$restoredPackagesDir"
415
628
SOURCE_BUILT_PKGS_PATH=" $SCRIPT_ROOT /artifacts/obj/$buildArch /$configuration /blob-feed/packages/"
416
629
export DOTNET_ROOT=" $dotnetDir "
417
630
# OSX also requires DOTNET_ROOT to be on the PATH
418
- if [ ` uname` == ' Darwin' ]; then
631
+ if [ " $( uname) " == ' Darwin' ]; then
419
632
export PATH=" $dotnetDir :$PATH "
420
633
fi
421
634
@@ -456,4 +669,6 @@ if [ "$excludeOnlineTests" == "false" ]; then
456
669
echo " ONLINE RESTORE SOURCE - ALL TESTS PASSED!"
457
670
fi
458
671
672
+ runXmlDocTests
673
+
459
674
echo " ALL TESTS PASSED!"
0 commit comments