Skip to content

Commit

Permalink
Merge branch 'master' into clientSpecificConfigExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
peterrsongg authored May 2, 2023
2 parents db5fd31 + a8b0265 commit 3c2779a
Show file tree
Hide file tree
Showing 7,151 changed files with 638,260 additions and 139,199 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The [GitHub issues][sdk-issues] are intended for bug reports and feature request

## SDK Change Log

The change log for the SDK can be found in the [SDK.CHANGELOG.md](https://github.com/aws/aws-sdk-net/blob/master/SDK.CHANGELOG.md) file.
The change log for the SDK can be found in the [SDK.CHANGELOG.ALL.md](https://github.com/aws/aws-sdk-net/blob/master/SDK.CHANGELOG.ALL.md) file. Change logs divided up by year can be found in the [changelogs folder](https://github.com/aws/aws-sdk-net/tree/master/changelogs).

## Maintenance and support for SDK major versions

Expand Down Expand Up @@ -450,6 +450,8 @@ Unit tests can be found in the **AWSSDK.UnitTests** project.
* Introducing Amazon Interactive Video Service - a managed live streaming solution that is quick and easy to set up, and ideal for creating interactive video experiences.
* [AWSSDK.Ivschat](https://www.nuget.org/packages/AWSSDK.Ivschat/)
* Adds new APIs for IVS Chat, a feature for building interactive chat experiences alongside an IVS broadcast.
* [AWSSDK.IVSRealTime](https://www.nuget.org/packages/AWSSDK.IVSRealTime/)
* Initial release of the Amazon Interactive Video Service RealTime API.
* [AWSSDK.Kafka](https://www.nuget.org/packages/AWSSDK.Kafka/)
* Amazon Managed Streaming for Kafka (Amazon MSK). Amazon MSK is a service that you can use to easily build, monitor, and manage Apache Kafka clusters in the cloud.
* [AWSSDK.KafkaConnect](https://www.nuget.org/packages/AWSSDK.KafkaConnect/)
Expand Down Expand Up @@ -586,6 +588,8 @@ Unit tests can be found in the **AWSSDK.UnitTests** project.
* AWS OpsWorks for Chef Automate gives customers a single tenant Chef Automate server. The Chef Automate server is fully managed by AWS and supports automatic backup, restore and upgrade operations.
* [AWSSDK.Organizations](https://www.nuget.org/packages/AWSSDK.Organizations/)
* AWS Organizations is a web service that enables you to consolidate your multiple AWS accounts into an organization and centrally manage your accounts and their resources.
* [AWSSDK.OSIS](https://www.nuget.org/packages/AWSSDK.OSIS/)
* Initial release for OpenSearch Ingestion
* [AWSSDK.Outposts](https://www.nuget.org/packages/AWSSDK.Outposts/)
* This is the initial release for AWS Outposts, a fully managed service that extends AWS infrastructure, services, APIs, and tools to customer sites. AWS Outposts enables you to launch and run EC2 instances and EBS volumes locally at your on-premises location. This release introduces new APIs for creating and viewing Outposts.
* [AWSSDK.Panorama](https://www.nuget.org/packages/AWSSDK.Panorama/)
Expand Down Expand Up @@ -764,6 +768,8 @@ Unit tests can be found in the **AWSSDK.UnitTests** project.
* Public preview release of Amazon Translate and the Amazon Translate Developer Guide. For more information, see the Amazon Translate Developer Guide.
* [AWSSDK.VoiceID](https://www.nuget.org/packages/AWSSDK.VoiceID/)
* Released the Amazon Voice ID SDK, for usage with the Amazon Connect Voice ID feature released for Amazon Connect.
* [AWSSDK.VPCLattice](https://www.nuget.org/packages/AWSSDK.VPCLattice/)
* General Availability (GA) release of Amazon VPC Lattice
* [AWSSDK.WAF](https://www.nuget.org/packages/AWSSDK.WAF/)
* AWS WAF (Web Application Firewall) protects web applications from attack by allowing customers to block bad actors and provides filters against common web exploits like SQL injection.
* [AWSSDK.WAFRegional](https://www.nuget.org/packages/AWSSDK.WAFRegional/)
Expand Down
498 changes: 498 additions & 0 deletions SDK.CHANGELOG.ALL.md

Large diffs are not rendered by default.

28 changes: 25 additions & 3 deletions buildtools/TestWrapper/TestRunners/Runners/TestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ protected TestRunner(string testSuiteExecutable, FileInfo testContainer, Directo
public TestConfiguration Configuration { get; set; }
public string TestExecutionProfile { get; set; }

/// <summary>
/// Whether the final test results file should be kept on disk.
/// If set to true, the TRX file will not be deleted after all tests run successfully or
/// all retries are exhausted.
/// </summary>
public bool KeepTestResults { get; set; }

private string TestResultsPath => Path.Combine(TestContainer.DirectoryName, "TestResults");

/// <summary>
Expand Down Expand Up @@ -120,6 +127,12 @@ public bool RunTests(out IList<string> failedTestNames, out Exception exception)
{
break;
}

// If the max number of retries hasn't been reached yet, delete the current test results file.
if (runCount < MaxTestRuns)
{
CleanUpTestResults();
}
}
}
catch (Exception e)
Expand All @@ -129,6 +142,13 @@ public bool RunTests(out IList<string> failedTestNames, out Exception exception)
allTestsPassed = false;
}

// At this point, the tests have completed (either successfully or not), but we check
// if whoever invoked the task requested the results files should be maintained.
if (!KeepTestResults)
{
CleanUpTestResults();
}

return allTestsPassed;
}

Expand All @@ -138,11 +158,13 @@ protected ResultsSummary Run(IEnumerable<string> tests)
int exitCode = InvokeTestSuite(args, out var logLocation);
var summary = ParseLog(exitCode, logLocation);

// Clean up the log files.
Directory.Delete(TestResultsPath, true);

return summary;
}

private void CleanUpTestResults()
{
Directory.Delete(TestResultsPath, true);
}

private static ResultsSummary ParseLog(int exitCode, string logLocation)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ protected override void PrepareRunner()
TestRunner.TestConfiguration.Release :
(TestRunner.TestConfiguration)Enum.Parse(typeof(TestRunner.TestConfiguration), Configuration.ItemSpec);
msTestRunner.TestExecutionProfile = TestExecutionProfile.ItemSpec;
msTestRunner.KeepTestResults = KeepTestResultsFile;
Runner = msTestRunner;
}
}
Expand Down
14 changes: 14 additions & 0 deletions buildtools/TestWrapper/TestRunners/Tasks/TestWrapperTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public abstract class TestWrapperTask : Task
public ITaskItem TestContainer { get; set; }
public ITaskItem Configuration { get; set; }
public ITaskItem TestExecutionProfile { get; set; }
public ITaskItem KeepTestResults { get; set; }

protected FileInfo TestContainerFileInfo { get { return new FileInfo(TestContainer.ItemSpec); } }
protected string TestSuiteRunnerFileInfo { get { return TestSuiteRunner.ItemSpec; } }
Expand All @@ -38,6 +39,19 @@ protected string[] CategoriesArray
return array;
}
}
protected bool KeepTestResultsFile
{
get
{
if (KeepTestResults == null || !bool.TryParse(KeepTestResults.ItemSpec, out var result))
{
return false;
}

return result;
}
}

protected TestRunner Runner { get; set; }

public TestWrapperTask()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ protected override void PrepareRunner()
TestRunner.TestConfiguration.Release :
(TestRunner.TestConfiguration)Enum.Parse(typeof(TestRunner.TestConfiguration), Configuration.ItemSpec);
xunitRunner.TestExecutionProfile = TestExecutionProfile.ItemSpec;
xunitRunner.KeepTestResults = KeepTestResultsFile;
Runner = xunitRunner;
}
}
Expand Down
37 changes: 33 additions & 4 deletions buildtools/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<InternalBuildTools Condition="'$(InternalBuildTools)'==''">..\..\AWSDotNetBuildTools</InternalBuildTools>
<InternalBuildScripts Condition="'$(InternalBuildScripts)'==''">$(InternalBuildTools)\BuildScripts</InternalBuildScripts>
<DisableValidateRepo Condition="'$(DisableValidateRepo)'==''">false</DisableValidateRepo>
<TestBackwardCompatibility Condition="'$(TestBackwardCompatibility)'==''">true</TestBackwardCompatibility>
<ServiceList Condition="'$(ServiceList)'==''"></ServiceList>
Expand All @@ -23,8 +24,12 @@

<CodeSigning Condition="'$(CodeSigning)'==''">false</CodeSigning>
</PropertyGroup>
<PropertyGroup>
<SignSdkArtifacts-DependsOnTargets>build-tools;build-buildtools;build-extensions</SignSdkArtifacts-DependsOnTargets>
</PropertyGroup>

<Import Project="$(InternalBuildTools)\references.targets" Condition="Exists('$(InternalBuildTools)\references.targets')" />
<Import Project="$(InternalBuildTools)\CodeSign.props" Condition="Exists('$(InternalBuildTools)\CodeSign.props')" />
<Import Project="common.targets" />

<!-- properties used in documentation generation -->
Expand Down Expand Up @@ -206,14 +211,14 @@

<Target Name="verify-signed-sdk-artifacts" Condition="'$(CodeSigning)'=='true'" DependsOnTargets="sign-sdk-artifacts">
<Exec LogStandardErrorAsError="true"
Command="$(powershell) -ExecutionPolicy Unrestricted -NoProfile -File $(InternalBuildTools)\BuildScripts\Test-Signature.ps1 -folder ..\sdk\code-analysis\NuGetInstallScripts\ -pattern *.ps1"/>
Command="$(powershell) -ExecutionPolicy Unrestricted -NoProfile -File $(InternalBuildScripts)\Test-Signature.ps1 -folder ..\sdk\code-analysis\NuGetInstallScripts\ -pattern *.ps1"/>
<Exec LogStandardErrorAsError="true"
Command="$(powershell) -ExecutionPolicy Unrestricted -NoProfile -File $(InternalBuildTools)\BuildScripts\Test-Signature.ps1 -folder ..\sdk\nuget-content\ -pattern *.ps1"/>
Command="$(powershell) -ExecutionPolicy Unrestricted -NoProfile -File $(InternalBuildScripts)\Test-Signature.ps1 -folder ..\sdk\nuget-content\ -pattern *.ps1"/>
<Exec LogStandardErrorAsError="true"
Command="$(powershell) -ExecutionPolicy Unrestricted -NoProfile -File $(InternalBuildTools)\BuildScripts\Test-Signature.ps1 -folder ..\Deployment\ -pattern AWSSDK*.dll"/>
Command="$(powershell) -ExecutionPolicy Unrestricted -NoProfile -File $(InternalBuildScripts)\Test-Signature.ps1 -folder ..\Deployment\ -pattern AWSSDK*.dll"/>
</Target>

<Target Name="sign-sdk-artifacts" Condition="Exists('$(InternalBuildTools)\references.targets') And $(CodeSigning)" DependsOnTargets="build-tools;build-buildtools;build-extensions">
<Target Name="sign-sdk-artifacts" Condition="Exists('$(InternalBuildTools)\references.targets') And $(CodeSigning)" DependsOnTargets="$(SignSdkArtifacts-DependsOnTargets)">
<!-- Configure project specfic code sign properties -->
<ItemGroup>
<!-- SDK items -->
Expand Down Expand Up @@ -644,4 +649,28 @@
NameSpace.ClassNamePrefix* -->
<Exec Command='$(InternalBuildTools)\AssemblyComparer\AssemblyComparer\bin\Release\net46\AssemblyComparer.exe package-comparer --package-name AWSSDK.Core --download-folder ..\NuGetDownloads\ --nuspec ..\sdk\src\Core\AWSSDK.Core.nuspec -cf BinaryIncompatibility,SourceIncompatibility,Warning -ig "$(BackwardIncompatibilitiesToIgnore)"'/>
</Target>

<Target Name="build-unit-tests">
<Exec Command="dotnet restore -f $(UnitTestsProjectFile)" WorkingDirectory="$(UnitTestsWorkingDirectory)" />
<Exec Command="dotnet clean -c $(Configuration) $(UnitTestsProjectFile)" WorkingDirectory="$(UnitTestsWorkingDirectory)" />
<Exec Command="dotnet build -c $(Configuration) $(UnitTestsProjectFile) /p:AWSKeyFile=$(CustomSnkFileLocation);SignAssembly=true;RunAnalyzersDuringBuild=$(RunAnalyzersDuringBuild);RuleSetFileForBuild=$(RuleSetFileForBuild)" WorkingDirectory="$(UnitTestsWorkingDirectory)" />
</Target>

<Target Name="run-unit-tests-mstest" DependsOnTargets="build-test-wrapper;build-unit-tests">
<MsTestWrapperTask
TestSuiteRunner="dotnet"
TestContainer="$(UnitTestsWorkingDirectory)\$(UnitTestsProjectFile)"
Configuration="$(Configuration)"
TestExecutionProfile="$(UnitTestsRunnerProfile)"
KeepTestResults="true" />
</Target>

<Target Name="run-unit-tests-xunit" DependsOnTargets="build-test-wrapper;build-unit-tests">
<XUnitWrapperTask
TestSuiteRunner="dotnet"
TestContainer="$(UnitTestsWorkingDirectory)\$(UnitTestsProjectFile)"
Configuration="$(Configuration)"
TestExecutionProfile="$(UnitTestsRunnerProfile)"
KeepTestResults="true" />
</Target>
</Project>
Loading

0 comments on commit 3c2779a

Please sign in to comment.