TestImpactFramework
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -26,8 +26,8 @@ namespace TestImpact
|
||||
|
||||
void ImpactAnalysisTestSelection(size_t numSelectedTests, size_t numDiscardedTests, size_t numExcludedTests, size_t numDraftedTests)
|
||||
{
|
||||
const float totalTests = numSelectedTests + numDiscardedTests;
|
||||
const float saving = (1.0 - (numSelectedTests / totalTests)) * 100.0f;
|
||||
const float totalTests = static_cast<float>(numSelectedTests + numDiscardedTests);
|
||||
const float saving = (1.0f - (numSelectedTests / totalTests)) * 100.0f;
|
||||
|
||||
std::cout << numSelectedTests << " tests selected, " << numDiscardedTests << " tests discarded (" << saving << "% test saving)\n";
|
||||
std::cout << "Of which " << numExcludedTests << " tests have been excluded and " << numDraftedTests << " tests have been drafted.\n";
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ namespace TestImpact
|
||||
const auto getDuration = [&Keys](const AZ::rapidxml::xml_node<>* node)
|
||||
{
|
||||
const AZStd::string duration = node->first_attribute(Keys[DurationKey])->value();
|
||||
return AZStd::chrono::milliseconds(AZStd::stof(duration) * 1000.f);
|
||||
return AZStd::chrono::milliseconds(static_cast<AZStd::sys_time_t>(AZStd::stof(duration) * 1000.f));
|
||||
};
|
||||
|
||||
TestRunSuite testSuite;
|
||||
|
||||
+3
-3
@@ -52,7 +52,7 @@ namespace TestImpact
|
||||
|
||||
// Run duration
|
||||
writer.Key(TestRunFields::Keys[TestRunFields::DurationKey]);
|
||||
writer.Uint(testRun.GetDuration().count());
|
||||
writer.Uint(static_cast<unsigned int>(testRun.GetDuration().count()));
|
||||
|
||||
// Suites
|
||||
writer.Key(TestRunFields::Keys[TestRunFields::SuitesKey]);
|
||||
@@ -69,7 +69,7 @@ namespace TestImpact
|
||||
|
||||
// Suite duration
|
||||
writer.Key(TestRunFields::Keys[TestRunFields::DurationKey]);
|
||||
writer.Uint(suite.m_duration.count());
|
||||
writer.Uint(static_cast<unsigned int>(suite.m_duration.count()));
|
||||
|
||||
// Suite enabled
|
||||
writer.Key(TestRunFields::Keys[TestRunFields::EnabledKey]);
|
||||
@@ -93,7 +93,7 @@ namespace TestImpact
|
||||
|
||||
// Test duration
|
||||
writer.Key(TestRunFields::Keys[TestRunFields::DurationKey]);
|
||||
writer.Uint(test.m_duration.count());
|
||||
writer.Uint(static_cast<unsigned int>(test.m_duration.count()));
|
||||
|
||||
// Test status
|
||||
writer.Key(TestRunFields::Keys[TestRunFields::StatusKey]);
|
||||
|
||||
Reference in New Issue
Block a user