From c93a2f06ff7f5944f390be98206367d23b649055 Mon Sep 17 00:00:00 2001 From: jonawals Date: Tue, 25 May 2021 15:37:31 +0100 Subject: [PATCH] Address PR comments --- .../JobRunner/TestImpactWin32_TestTargetExtension.cpp | 2 -- .../JobRunner/TestImpactTestJobInfoGenerator.cpp | 3 +++ .../TestEngine/JobRunner/TestImpactTestJobInfoGenerator.h | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Platform/Windows/TestEngine/JobRunner/TestImpactWin32_TestTargetExtension.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Platform/Windows/TestEngine/JobRunner/TestImpactWin32_TestTargetExtension.cpp index bd380ac2a7..12c78f91cf 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/Platform/Windows/TestEngine/JobRunner/TestImpactWin32_TestTargetExtension.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/Platform/Windows/TestEngine/JobRunner/TestImpactWin32_TestTargetExtension.cpp @@ -10,8 +10,6 @@ * */ -#pragma once - #include #include #include diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobInfoGenerator.cpp b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobInfoGenerator.cpp index 0cf717e88e..7e8e65e940 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobInfoGenerator.cpp +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobInfoGenerator.cpp @@ -156,6 +156,7 @@ namespace TestImpact TestEnumerator::JobInfo::CachePolicy cachePolicy) const { AZStd::vector jobInfos; + jobInfos.reserve(testTargets.size()); for (size_t jobId = 0; jobId < testTargets.size(); jobId++) { jobInfos.push_back(GenerateTestEnumerationJobInfo(testTargets[jobId], { jobId }, cachePolicy)); @@ -168,6 +169,7 @@ namespace TestImpact const AZStd::vector& testTargets) const { AZStd::vector jobInfos; + jobInfos.reserve(testTargets.size()); for (size_t jobId = 0; jobId < testTargets.size(); jobId++) { jobInfos.push_back(GenerateRegularTestRunJobInfo(testTargets[jobId], { jobId })); @@ -181,6 +183,7 @@ namespace TestImpact CoverageLevel coverageLevel) const { AZStd::vector jobInfos; + jobInfos.reserve(testTargets.size()); for (size_t jobId = 0; jobId < testTargets.size(); jobId++) { jobInfos.push_back(GenerateInstrumentedTestRunJobInfo(testTargets[jobId], { jobId }, coverageLevel)); diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobInfoGenerator.h b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobInfoGenerator.h index 0cae419e3a..1bd06f6372 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobInfoGenerator.h +++ b/Code/Tools/TestImpactFramework/Runtime/Code/Source/TestEngine/JobRunner/TestImpactTestJobInfoGenerator.h @@ -25,7 +25,7 @@ namespace TestImpact { class TestTarget; - // Generates job information for the different test job runner types. + //! Generates job information for the different test job runner types. class TestJobInfoGenerator { public: @@ -44,7 +44,7 @@ namespace TestImpact const RepoPath& testRunnerBinary, const RepoPath& instrumentBinary); - //! Generates a the information for a test enumeration job. + //! Generates the information for a test enumeration job. //! @param testTarget The test target to generate the job information for. //! @param jobId The id to assign for this job. //! @param cachePolicy The cache policy to use for this job. @@ -53,14 +53,14 @@ namespace TestImpact TestEnumerator::JobInfo::Id jobId, TestEnumerator::JobInfo::CachePolicy cachePolicy) const; - //! Generates a the information for a test run job. + //! Generates the information for a test run job. //! @param testTarget The test target to generate the job information for. //! @param jobId The id to assign for this job. TestRunner::JobInfo GenerateRegularTestRunJobInfo( const TestTarget* testTarget, TestRunner::JobInfo::Id jobId) const; - //! Generates a the information for an instrumented test run job. + //! Generates the information for an instrumented test run job. //! @param testTarget The test target to generate the job information for. //! @param jobId The id to assign for this job. //! @param coverageLevel The coverage level to use for this job.