/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2020 Samsung Electronics Co., Ltd. All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
std::string SummaryCollector::CollectorSpecificHelp() const
{
- return "--file=<filename> - name of file for output\n"
- " default - " + DEFAULT_SUMMARY_FILE_NAME + "\n";
+ return CollectorFileHelp(DEFAULT_SUMMARY_FILE_NAME);
}
bool SummaryCollector::ParseCollectorSpecificArg(const std::string& arg)
writeStats(true);
}
-void SummaryCollector::CollectResult(const std::string& id,
- const FailStatus status,
- const std::string& reason,
- const bool& isPerformanceTest,
- const std::chrono::system_clock::duration& performanceTime,
- const std::chrono::system_clock::duration& performanceMaxTime)
+void SummaryCollector::CollectResult(const std::string& id, const TestResult &result)
{
DPL_UNUSED_PARAM(id);
- DPL_UNUSED_PARAM(reason);
- DPL_UNUSED_PARAM(isPerformanceTest);
- DPL_UNUSED_PARAM(performanceTime);
- DPL_UNUSED_PARAM(performanceMaxTime);
- m_stats.AddTest(status);
+ m_stats.AddTest(result.GetFailStatus());
writeStats(true);
}
void SummaryCollector::writeStats(bool segfault)
{
- m_output.open(m_filename.c_str(), std::ofstream::out | std::ofstream::trunc);
+ m_output.open(m_filename, std::ofstream::out | std::ofstream::trunc);
if (!m_output) {
LogPedantic("Could not open file " << m_filename << " for writing");
return;