Additional refactoring

This commit is contained in:
jonawals
2021-05-21 09:11:53 +01:00
parent d732b7d0ce
commit c477c699ef
4 changed files with 6 additions and 11 deletions
@@ -130,7 +130,7 @@ namespace TestImpact
private:
AZStd::vector<ExecutionFailure> m_executionFailures;
AZStd::vector<LauncherFailure> m_launcherFailures;
AZStd::vector<TargetFailure> m_unexecutedTestsTests;
AZStd::vector<TargetFailure> m_unexecutedTests;
};
//! Represents the report for a failed regular test sequence run without test impact analysis.
@@ -138,7 +138,7 @@ namespace TestImpact
{
// Autogen input files are not compiled sources and thus supplying coverage data for them makes no sense
AZ_TestImpact_Eval(
m_autogenInputToOutputMap.find(sourceCoverage.GetPath().c_str()) == m_autogenInputToOutputMap.end(),
m_autogenInputToOutputMap.find(sourceCoverage.GetPath().String()) == m_autogenInputToOutputMap.end(),
DependencyException, AZStd::string::format("Couldn't replace source coverage for %s, source file is an autogen input file",
sourceCoverage.GetPath().c_str()).c_str());
@@ -188,16 +188,12 @@ namespace TestImpact
// Clearing the coverage data of an autogen input source instead clears the coverage data of its output sources
for (const auto& outputSource : outputSources->second)
{
AZStd::vector<SourceCoveringTests> coverage;
coverage.emplace_back(RepoPath(outputSource));
ReplaceSourceCoverage(SourceCoveringTestsList(AZStd::move(coverage)));
ReplaceSourceCoverage(SourceCoveringTestsList(AZStd::vector<SourceCoveringTests>{ SourceCoveringTests(RepoPath(outputSource)) }));
}
}
else
{
AZStd::vector<SourceCoveringTests> coverage;
coverage.emplace_back(RepoPath(path));
ReplaceSourceCoverage(SourceCoveringTestsList(AZStd::move(coverage)));
ReplaceSourceCoverage(SourceCoveringTestsList(AZStd::vector<SourceCoveringTests>{ SourceCoveringTests(RepoPath(path)) }));
}
}
}
@@ -34,8 +34,7 @@ namespace TestImpact
struct JobMeta
{
JobResult m_result = JobResult::NotExecuted;
AZStd::optional<AZStd::chrono::high_resolution_clock::time_point>
m_startTime; //!< The time, relative to the job runner start, that this job started.
AZStd::optional<AZStd::chrono::high_resolution_clock::time_point> m_startTime; //!< The time, relative to the job runner start, that this job started.
AZStd::optional<AZStd::chrono::milliseconds> m_duration; //!< The duration that this job took to complete.
AZStd::optional<ReturnCode> m_returnCode; //!< The return code of the underlying processes of this job.
};
@@ -74,7 +74,7 @@ namespace TestImpact
m_targets.reserve(descriptors.size());
for (auto&& descriptor : descriptors)
{
m_targets.emplace_back(AZStd::move(Target(AZStd::move(descriptor))));
m_targets.emplace_back(Target(AZStd::move(descriptor)));
}
}