Address PR comments

This commit is contained in:
jonawals
2021-05-25 15:37:31 +01:00
parent c2ed533005
commit c93a2f06ff
3 changed files with 7 additions and 6 deletions
@@ -10,8 +10,6 @@
*
*/
#pragma once
#include <Target/TestImpactTestTarget.h>
#include <TestEngine/TestImpactTestEngineException.h>
#include <TestEngine/JobRunner/TestImpactTestTargetExtension.h>
@@ -156,6 +156,7 @@ namespace TestImpact
TestEnumerator::JobInfo::CachePolicy cachePolicy) const
{
AZStd::vector<TestEnumerator::JobInfo> 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<const TestTarget*>& testTargets) const
{
AZStd::vector<TestRunner::JobInfo> 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<InstrumentedTestRunner::JobInfo> jobInfos;
jobInfos.reserve(testTargets.size());
for (size_t jobId = 0; jobId < testTargets.size(); jobId++)
{
jobInfos.push_back(GenerateInstrumentedTestRunJobInfo(testTargets[jobId], { jobId }, coverageLevel));
@@ -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.