Merge pull request #7566 from aws-lumberyard-dev/fixClangWindowsBuild
Fix clang windows build
This commit is contained in:
+1
-1
@@ -186,7 +186,7 @@ namespace TestImpact
|
||||
void TestRunCompleteCallback(const Client::TestRunBase& testRun, size_t numTestRunsCompleted, size_t totalNumTestRuns)
|
||||
{
|
||||
const auto progress =
|
||||
AZStd::string::format("(%03u/%03u)", numTestRunsCompleted, totalNumTestRuns, testRun.GetTargetName().c_str());
|
||||
AZStd::string::format("(%03zu/%03zu)", numTestRunsCompleted, totalNumTestRuns);
|
||||
|
||||
AZStd::string result;
|
||||
switch (testRun.GetResult())
|
||||
|
||||
+11
-11
@@ -391,57 +391,57 @@ namespace TestImpact
|
||||
// SequenceReport overrides ...
|
||||
AZStd::chrono::milliseconds GetDuration() const override
|
||||
{
|
||||
return GetDuration() + m_draftedTestRunReport.GetDuration();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetDuration() + m_draftedTestRunReport.GetDuration();
|
||||
}
|
||||
|
||||
TestSequenceResult GetResult() const override
|
||||
{
|
||||
return CalculateMultiTestSequenceResult({ GetResult(), m_draftedTestRunReport.GetResult() });
|
||||
return CalculateMultiTestSequenceResult({ SequenceReportBase<Type, PolicyStateType>::GetResult(), m_draftedTestRunReport.GetResult() });
|
||||
}
|
||||
|
||||
size_t GetTotalNumTestRuns() const override
|
||||
{
|
||||
return GetTotalNumTestRuns() + m_draftedTestRunReport.GetTotalNumTestRuns();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumTestRuns() + m_draftedTestRunReport.GetTotalNumTestRuns();
|
||||
}
|
||||
|
||||
size_t GetTotalNumPassingTests() const override
|
||||
{
|
||||
return GetTotalNumPassingTests() + m_draftedTestRunReport.GetTotalNumPassingTests();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumPassingTests() + m_draftedTestRunReport.GetTotalNumPassingTests();
|
||||
}
|
||||
|
||||
size_t GetTotalNumFailingTests() const override
|
||||
{
|
||||
return GetTotalNumFailingTests() + m_draftedTestRunReport.GetTotalNumFailingTests();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumFailingTests() + m_draftedTestRunReport.GetTotalNumFailingTests();
|
||||
}
|
||||
|
||||
size_t GetTotalNumDisabledTests() const override
|
||||
{
|
||||
return GetTotalNumDisabledTests() + m_draftedTestRunReport.GetTotalNumDisabledTests();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumDisabledTests() + m_draftedTestRunReport.GetTotalNumDisabledTests();
|
||||
}
|
||||
|
||||
size_t GetTotalNumPassingTestRuns() const override
|
||||
{
|
||||
return GetTotalNumPassingTestRuns() + m_draftedTestRunReport.GetNumPassingTestRuns();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumPassingTestRuns() + m_draftedTestRunReport.GetNumPassingTestRuns();
|
||||
}
|
||||
|
||||
size_t GetTotalNumFailingTestRuns() const override
|
||||
{
|
||||
return GetTotalNumFailingTestRuns() + m_draftedTestRunReport.GetNumFailingTestRuns();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumFailingTestRuns() + m_draftedTestRunReport.GetNumFailingTestRuns();
|
||||
}
|
||||
|
||||
size_t GetTotalNumExecutionFailureTestRuns() const override
|
||||
{
|
||||
return GetTotalNumExecutionFailureTestRuns() + m_draftedTestRunReport.GetNumExecutionFailureTestRuns();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumExecutionFailureTestRuns() + m_draftedTestRunReport.GetNumExecutionFailureTestRuns();
|
||||
}
|
||||
|
||||
size_t GetTotalNumTimedOutTestRuns() const override
|
||||
{
|
||||
return GetTotalNumTimedOutTestRuns() + m_draftedTestRunReport.GetNumTimedOutTestRuns();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumTimedOutTestRuns() + m_draftedTestRunReport.GetNumTimedOutTestRuns();
|
||||
}
|
||||
|
||||
size_t GetTotalNumUnexecutedTestRuns() const override
|
||||
{
|
||||
return GetTotalNumUnexecutedTestRuns() + m_draftedTestRunReport.GetNumUnexecutedTestRuns();
|
||||
return SequenceReportBase<Type, PolicyStateType>::GetTotalNumUnexecutedTestRuns() + m_draftedTestRunReport.GetNumUnexecutedTestRuns();
|
||||
}
|
||||
private:
|
||||
AZStd::vector<AZStd::string> m_draftedTestRuns;
|
||||
|
||||
+14
-14
@@ -24,13 +24,13 @@ namespace TestImpact
|
||||
using value_type = AZ::IO::Path::value_type;
|
||||
|
||||
constexpr RepoPath() = default;
|
||||
constexpr RepoPath(const RepoPath&) = default;
|
||||
constexpr RepoPath(RepoPath&&) noexcept = default;
|
||||
constexpr RepoPath(const string_type& path) noexcept;
|
||||
constexpr RepoPath(const string_view_type& path) noexcept;
|
||||
constexpr RepoPath(const value_type* path) noexcept;
|
||||
constexpr RepoPath(const AZ::IO::PathView& path);
|
||||
constexpr RepoPath(const AZ::IO::Path& path);
|
||||
RepoPath(const RepoPath&) = default;
|
||||
RepoPath(RepoPath&&) noexcept = default;
|
||||
RepoPath(const string_type& path) noexcept;
|
||||
RepoPath(const string_view_type& path) noexcept;
|
||||
RepoPath(const value_type* path) noexcept;
|
||||
RepoPath(const AZ::IO::PathView& path);
|
||||
RepoPath(const AZ::IO::Path& path);
|
||||
|
||||
RepoPath& operator=(const RepoPath&) noexcept = default;
|
||||
RepoPath& operator=(const string_type&) noexcept;
|
||||
@@ -52,11 +52,11 @@ namespace TestImpact
|
||||
// Wrappers around the AZ::IO::Path concatenation operator
|
||||
friend RepoPath operator/(const RepoPath& lhs, const AZ::IO::PathView& rhs);
|
||||
friend RepoPath operator/(const RepoPath& lhs, AZStd::string_view rhs);
|
||||
friend RepoPath operator/(const RepoPath& lhs, const typename value_type* rhs);
|
||||
friend RepoPath operator/(const RepoPath& lhs, const value_type* rhs);
|
||||
friend RepoPath operator/(const RepoPath& lhs, const RepoPath& rhs);
|
||||
RepoPath& operator/=(const AZ::IO::PathView& rhs);
|
||||
RepoPath& operator/=(AZStd::string_view rhs);
|
||||
RepoPath& operator/=(const typename value_type* rhs);
|
||||
RepoPath& operator/=(const value_type* rhs);
|
||||
RepoPath& operator/=(const RepoPath& rhs);
|
||||
|
||||
friend bool operator==(const RepoPath& lhs, const RepoPath& rhs) noexcept;
|
||||
@@ -67,27 +67,27 @@ namespace TestImpact
|
||||
AZ::IO::Path m_path;
|
||||
};
|
||||
|
||||
constexpr RepoPath::RepoPath(const string_type& path) noexcept
|
||||
inline RepoPath::RepoPath(const string_type& path) noexcept
|
||||
: m_path(AZ::IO::Path(path).MakePreferred())
|
||||
{
|
||||
}
|
||||
|
||||
constexpr RepoPath::RepoPath(const string_view_type& path) noexcept
|
||||
inline RepoPath::RepoPath(const string_view_type& path) noexcept
|
||||
: m_path(AZ::IO::Path(path).MakePreferred())
|
||||
{
|
||||
}
|
||||
|
||||
constexpr RepoPath::RepoPath(const value_type* path) noexcept
|
||||
inline RepoPath::RepoPath(const value_type* path) noexcept
|
||||
: m_path(AZ::IO::Path(path).MakePreferred())
|
||||
{
|
||||
}
|
||||
|
||||
constexpr RepoPath::RepoPath(const AZ::IO::PathView& path)
|
||||
inline RepoPath::RepoPath(const AZ::IO::PathView& path)
|
||||
: m_path(AZ::IO::Path(path).MakePreferred())
|
||||
{
|
||||
}
|
||||
|
||||
constexpr RepoPath::RepoPath(const AZ::IO::Path& path)
|
||||
inline RepoPath::RepoPath(const AZ::IO::Path& path)
|
||||
: m_path(AZ::IO::Path(path).MakePreferred())
|
||||
{
|
||||
}
|
||||
|
||||
+2
@@ -69,6 +69,7 @@ namespace TestImpact
|
||||
const auto getDuration = [Keys](const AZ::rapidxml::xml_node<>* node)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
AZ_UNUSED(Keys); // Clang reports a warning that capturing Keys is not necessary because it is not odr-used
|
||||
const AZStd::string duration = node->first_attribute(Keys[DurationKey])->value();
|
||||
return AZStd::chrono::milliseconds(static_cast<AZStd::sys_time_t>(AZStd::stof(duration) * 1000.f));
|
||||
};
|
||||
@@ -86,6 +87,7 @@ namespace TestImpact
|
||||
const auto getStatus = [Keys](const AZ::rapidxml::xml_node<>* node)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
AZ_UNUSED(Keys); // Clang reports a warning that capturing Keys is not necessary because it is not odr-used
|
||||
const AZStd::string status = node->first_attribute(Keys[StatusKey])->value();
|
||||
if (status == Keys[RunKey])
|
||||
{
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ namespace TestImpact
|
||||
public:
|
||||
Pipe(SECURITY_ATTRIBUTES& sa, HANDLE& stdChannel);
|
||||
Pipe(Pipe&& other) = delete;
|
||||
Pipe(Pipe& other) = delete;
|
||||
Pipe& operator=(Pipe& other) = delete;
|
||||
Pipe(const Pipe& other) = delete;
|
||||
Pipe& operator=(const Pipe& other) = delete;
|
||||
Pipe& operator=(Pipe&& other) = delete;
|
||||
|
||||
//! Releases the child end of the pipe (not needed once parent has their end).
|
||||
|
||||
+5
-5
@@ -58,14 +58,14 @@ namespace TestImpact
|
||||
//! @param payloadMapProducer The client callback to be called when all jobs have finished to transform the work produced by each job into the desired output.
|
||||
//! @param jobCallback The client callback to be called when each job changes state.
|
||||
//! @return The result of the run sequence and the jobs with their associated payloads.
|
||||
AZStd::pair<ProcessSchedulerResult, AZStd::vector<typename JobT>> Execute(
|
||||
AZStd::pair<ProcessSchedulerResult, AZStd::vector<JobT>> Execute(
|
||||
const AZStd::vector<typename JobT::Info>& jobs,
|
||||
PayloadMapProducer<JobT> payloadMapProducer,
|
||||
StdOutputRouting stdOutRouting,
|
||||
StdErrorRouting stdErrRouting,
|
||||
AZStd::optional<AZStd::chrono::milliseconds> jobTimeout,
|
||||
AZStd::optional<AZStd::chrono::milliseconds> runnerTimeout,
|
||||
JobCallback<typename JobT> jobCallback);
|
||||
JobCallback<JobT> jobCallback);
|
||||
|
||||
private:
|
||||
ProcessScheduler m_processScheduler;
|
||||
@@ -82,17 +82,17 @@ namespace TestImpact
|
||||
}
|
||||
|
||||
template<typename JobT>
|
||||
AZStd::pair<ProcessSchedulerResult, AZStd::vector<typename JobT>> JobRunner<JobT>::Execute(
|
||||
AZStd::pair<ProcessSchedulerResult, AZStd::vector<JobT>> JobRunner<JobT>::Execute(
|
||||
const AZStd::vector<typename JobT::Info>& jobInfos,
|
||||
PayloadMapProducer<JobT> payloadMapProducer,
|
||||
StdOutputRouting stdOutRouting,
|
||||
StdErrorRouting stdErrRouting,
|
||||
AZStd::optional<AZStd::chrono::milliseconds> jobTimeout,
|
||||
AZStd::optional<AZStd::chrono::milliseconds> runnerTimeout,
|
||||
JobCallback<typename JobT> jobCallback)
|
||||
JobCallback<JobT> jobCallback)
|
||||
{
|
||||
AZStd::vector<ProcessInfo> processes;
|
||||
AZStd::unordered_map<JobT::Info::IdType, AZStd::pair<JobMeta, const typename JobT::Info*>> metas;
|
||||
AZStd::unordered_map<typename JobT::Info::IdType, AZStd::pair<JobMeta, const typename JobT::Info*>> metas;
|
||||
AZStd::vector<JobT> jobs;
|
||||
jobs.reserve(jobInfos.size());
|
||||
processes.reserve(jobInfos.size());
|
||||
|
||||
+3
-4
@@ -162,7 +162,7 @@ namespace TestImpact
|
||||
{
|
||||
}
|
||||
|
||||
[[nodiscard]] ProcessCallbackResult operator()(const typename JobInfo& jobInfo, const TestImpact::JobMeta& meta)
|
||||
[[nodiscard]] ProcessCallbackResult operator()(const JobInfo& jobInfo, const TestImpact::JobMeta& meta)
|
||||
{
|
||||
const auto id = jobInfo.GetId().m_value;
|
||||
const auto& args = jobInfo.GetCommand().m_args;
|
||||
@@ -189,7 +189,7 @@ namespace TestImpact
|
||||
|
||||
private:
|
||||
const AZStd::vector<const TestTarget*>& m_testTargets;
|
||||
TestEngineJobMap<typename IdType>* m_engineJobs;
|
||||
TestEngineJobMap<IdType>* m_engineJobs;
|
||||
Policy::ExecutionFailure m_executionFailurePolicy;
|
||||
Policy::TestFailure m_testFailurePolicy;
|
||||
AZStd::optional<TestEngineJobCompleteCallback>* m_callback;
|
||||
@@ -239,8 +239,7 @@ namespace TestImpact
|
||||
const RepoPath& testRunnerBinary,
|
||||
const RepoPath& instrumentBinary,
|
||||
size_t maxConcurrentRuns)
|
||||
: m_maxConcurrentRuns(maxConcurrentRuns)
|
||||
, m_testJobInfoGenerator(AZStd::make_unique<TestJobInfoGenerator>(
|
||||
: m_testJobInfoGenerator(AZStd::make_unique<TestJobInfoGenerator>(
|
||||
sourceDir, targetBinaryDir, cacheDir, artifactDir, testRunnerBinary, instrumentBinary))
|
||||
, m_testEnumerator(AZStd::make_unique<TestEnumerator>(maxConcurrentRuns))
|
||||
, m_instrumentedTestRunner(AZStd::make_unique<InstrumentedTestRunner>(maxConcurrentRuns))
|
||||
|
||||
@@ -117,7 +117,6 @@ namespace TestImpact
|
||||
//! Cleans up the artifacts directory of any artifacts from previous runs.
|
||||
void DeleteArtifactXmls() const;
|
||||
|
||||
size_t m_maxConcurrentRuns = 0;
|
||||
AZStd::unique_ptr<TestJobInfoGenerator> m_testJobInfoGenerator;
|
||||
AZStd::unique_ptr<TestEnumerator> m_testEnumerator;
|
||||
AZStd::unique_ptr<InstrumentedTestRunner> m_instrumentedTestRunner;
|
||||
|
||||
+7
-6
@@ -6,6 +6,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/std/typetraits/disjunction.h>
|
||||
#include <TestImpactFramework/TestImpactClientSequenceReportSerializer.h>
|
||||
#include <TestImpactFramework/TestImpactSequenceReportException.h>
|
||||
#include <TestImpactFramework/TestImpactUtils.h>
|
||||
@@ -735,7 +736,11 @@ namespace TestImpact
|
||||
};
|
||||
}
|
||||
|
||||
template<typename PolicyStateType>
|
||||
template<typename PolicyStateType, typename = AZStd::enable_if_t<AZStd::disjunction_v<
|
||||
AZStd::is_same<PolicyStateType, SequencePolicyState>,
|
||||
AZStd::is_same<PolicyStateType, SafeImpactAnalysisSequencePolicyState>,
|
||||
AZStd::is_same<PolicyStateType, ImpactAnalysisSequencePolicyState>
|
||||
>>>
|
||||
PolicyStateType DeserializePolicyStateType(const rapidjson::Value& serialPolicyStateType)
|
||||
{
|
||||
if constexpr (AZStd::is_same_v<PolicyStateType, SequencePolicyState>)
|
||||
@@ -750,10 +755,6 @@ namespace TestImpact
|
||||
{
|
||||
return DeserializeImpactAnalysisSequencePolicyStateMembers(serialPolicyStateType);
|
||||
}
|
||||
else
|
||||
{
|
||||
static_assert(false, "Template paramater must be a valid policy state type");
|
||||
}
|
||||
}
|
||||
|
||||
template<typename SequenceReportBaseType>
|
||||
@@ -775,7 +776,7 @@ namespace TestImpact
|
||||
serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::MaxConcurrency]].GetUint64(),
|
||||
testTargetTimeout ? AZStd::optional<AZStd::chrono::milliseconds>{ testTargetTimeout } : AZStd::nullopt,
|
||||
globalTimeout ? AZStd::optional<AZStd::chrono::milliseconds>{ globalTimeout } : AZStd::nullopt,
|
||||
DeserializePolicyStateType<SequenceReportBaseType::PolicyState>(serialSequenceReportBase),
|
||||
DeserializePolicyStateType<typename SequenceReportBaseType::PolicyState>(serialSequenceReportBase),
|
||||
SuiteTypeFromString(serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::Suite]].GetString()),
|
||||
DeserializeTestSelection(serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::SelectedTestRuns]]),
|
||||
DeserializeTestRunReport(serialSequenceReportBase[SequenceReportFields::Keys[SequenceReportFields::SelectedTestRunReport]]));
|
||||
|
||||
Reference in New Issue
Block a user