Skip to content

Commit

Permalink
Merged PR 10242: Update Dev6x to fix the release build
Browse files Browse the repository at this point in the history
#### AI-Generated Description
The pull request contains two changes:

- In file **LogMessages.cs**, a line of code that defines a constant string for a JSON depth error message is removed.
- In file **Microsoft.IdentityModel.AotCompatibility.Tests.csproj**, a line of code that sets the language version to 10 is added.
  • Loading branch information
Jean-Marc Prieur authored and Brent Schmaltz committed Oct 16, 2023
1 parent 4845cf1 commit 74cc160
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 398 deletions.
49 changes: 12 additions & 37 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ param(
[string]$root=$PSScriptRoot,
[string]$runTests="YES",
[string]$failBuildOnTest="YES",
[string]$slnFile="wilson.sln",
[switch]$runApiCompat,
[switch]$generateContractAssemblies)
[string]$slnFile="wilson.sln"
)

################################################# Functions ############################################################

Expand Down Expand Up @@ -47,21 +46,6 @@ function CreateArtifactsRoot($folder)
mkdir $folder | Out-Null
}

function GenerateContractAssemblies($root)
{
# clear content of baseline files as it is not relevant for the next version
ClearBaselineFiles($root)

# execute generateContractAssemblies script
& "$root\generateContractAssemblies.ps1".
}

function ClearBaselineFiles($root)
{
Write-Host ">>> Clear-Content $root\Tools\apiCompat\baseline\*.txt"
Clear-Content $root\Tools\apiCompat\baseline\*.txt
}

################################################# Functions ############################################################

if ($env:VSINSTALLDIR)
Expand All @@ -79,8 +63,6 @@ Write-Host "root: " $root;
Write-Host "runTests: " $runTests;
Write-Host "failBuildOnTest: " $failBuildOnTest;
Write-Host "slnFile: " $slnFile;
Write-Host "runApiCompat: " $runApiCompat;
Write-Host "generateContractAssemblies: " $generateContractAssemblies;
WriteSectionFooter("End build.ps1 - parameters");

[xml]$buildConfiguration = Get-Content $PSScriptRoot\buildConfiguration.xml
Expand All @@ -105,17 +87,17 @@ WriteSectionFooter("End Environment");

$ErrorActionPreference = "Stop"

WriteSectionHeader("VerifyResourceUsage.pl");
WriteSectionHeader("VerifyResourceUsage.pl");

Write-Host ">>> Start-Process -Wait -PassThru -NoNewWindow perl $root\src\VerifyResourceUsage.pl"
$verifyResourceUsageResult = Start-Process -Wait -PassThru -NoNewWindow perl $root\src\VerifyResourceUsage.pl
Write-Host ">>> Start-Process -Wait -PassThru -NoNewWindow perl $root\src\VerifyResourceUsage.pl"
$verifyResourceUsageResult = Start-Process -Wait -PassThru -NoNewWindow perl $root\src\VerifyResourceUsage.pl

if($verifyResourceUsageResult.ExitCode -ne 0)
{
throw "VerifyResourceUsage.pl failed."
}
if($verifyResourceUsageResult.ExitCode -ne 0)
{
throw "VerifyResourceUsage.pl failed."
}

WriteSectionFooter("End VerifyResourceUsage.pl");
WriteSectionFooter("End VerifyResourceUsage.pl");

WriteSectionHeader("Build");

Expand All @@ -138,24 +120,17 @@ CreateArtifactsRoot($artifactsRoot);
pushd
Set-Location $root
Write-Host ""
Write-Host ">>> Start-Process -wait -NoNewWindow $msbuildexe /restore:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType /p:RunApiCompat=$runApiCompat $slnFile"
Write-Host ">>> Start-Process -wait -NoNewWindow $msbuildexe /restore:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType $slnFile"
Write-Host ""
Write-Host "msbuildexe: " $msbuildexe
$p = Start-Process -Wait -PassThru -NoNewWindow $msbuildexe "/r:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType /p:RunApiCompat=$runApiCompat $slnFile"
$p = Start-Process -Wait -PassThru -NoNewWindow $msbuildexe "/r:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType $slnFile"

if($p.ExitCode -ne 0)
{
throw "Build failed."
}
popd

if ($generateContractAssemblies.IsPresent)
{
WriteSectionHeader("Generating Contract Assemblies");
GenerateContractAssemblies($root);
WriteSectionFooter("End Generating Contract Assemblies");
}

foreach($project in $buildConfiguration.SelectNodes("root/projects/src/project"))
{
$name = $project.name;
Expand Down
49 changes: 49 additions & 0 deletions build/CodeCoverage.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- Customised run settings file to exclude test assemblies from coverage.
See https://msdn.microsoft.com/en-us/library/jj159530.aspx for more info. -->

<!-- File name extension must be .runsettings -->
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Configuration>
<CodeCoverage>

<!--
About include/exclude lists:
Empty "Include" clauses imply all; empty "Exclude" clauses imply none.
Each element in the list is a regular expression (ECMAScript syntax). See http://msdn.microsoft.com/library/2k3te2cs.aspx.
An item must first match at least one entry in the include list to be included.
Included items must then not match any entries in the exclude list to remain included.
-->

<!-- Match assembly file paths: -->
<ModulePaths>
<Include>
<ModulePath>.*\microsoft.identitymodel.abstractions.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.jsonwebtokens.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.keyvaultextensions.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.logging.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.loggingextensions.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.managedkeyvaultsecuritykey.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.protocols.openidconnect.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.protocols.signedhttprequest.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.protocols.wsfederation.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.protocols.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.testextensions.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.tokens.saml.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.tokens.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.validators.dll</ModulePath>
<ModulePath>.*\microsoft.identitymodel.xml.dll</ModulePath>
<ModulePath>.*\system.identitymodel.tokens.jwt.dll</ModulePath>
</Include>
</ModulePaths>

</CodeCoverage>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
49 changes: 0 additions & 49 deletions build/apiCompat.props

This file was deleted.

Loading

0 comments on commit 74cc160

Please sign in to comment.