Moved retry command to after the test fails

Signed-off-by: evanchia <evanchia@amazon.com>
This commit is contained in:
evanchia
2021-07-12 16:54:57 -07:00
parent a9c3bbe0b0
commit b1a1f78ca6
+11 -8
View File
@@ -126,17 +126,16 @@ namespace AzTestRunner
std::cout << "arg[" << i << "] " << argv[i] << std::endl;
}
// Construct a full retry command
std::cout << "Full command: " << argv[0] << " " << lib << " " << symbol;
for (int i = 1; i < argc; i++)
{
std::cout << " " << argv[i];
}
std::cout << std::endl;
std::cout << "LIB: " << lib << std::endl;
}
// Construct a retry command if test fails
std::string retry_command = "Retry command: " + std::string(argv[0]) + " " + lib + " " + symbol;
for (int i = 1; i < argc; i++)
{
retry_command.append(" " + std::string(argv[i]));
}
// Wait for debugger
if (waitForDebugger)
{
@@ -230,6 +229,10 @@ namespace AzTestRunner
if (testMainFunction->IsValid())
{
result = (*testMainFunction)(argc, argv);
if (result != 0)
{
std::cout << retry_command << std::endl;
}
std::cout << "OKAY " << symbol << "() returned " << result << std::endl;
testMainFunction.reset();
}