Skip to content

Commit 514bcb0

Browse files
committed
Add a test to verify xml/intellisense docs are present
This assumes all the xml docs are only present in the targeting packs, and not anywhere else. I am not sure if the ignore list is correct: do all the packages listed look okay? Fixes: #2127
1 parent 5ba421c commit 514bcb0

File tree

1 file changed

+215
-0
lines changed

1 file changed

+215
-0
lines changed

smoke-test.sh

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,219 @@ function runWebTests() {
334334
doCommand F# webapi "$@" new restore build run multi-rid-publish
335335
}
336336

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+
337550
function resetCaches() {
338551
rm -rf "$testingHome"
339552
mkdir "$testingHome"
@@ -456,4 +669,6 @@ if [ "$excludeOnlineTests" == "false" ]; then
456669
echo "ONLINE RESTORE SOURCE - ALL TESTS PASSED!"
457670
fi
458671

672+
runXmlDocTests
673+
459674
echo "ALL TESTS PASSED!"

0 commit comments

Comments
 (0)