Move collectors' file help to collectors' commons 02/30402/8
authorMarcin Niesluchowski <m.niesluchow@samsung.com>
Mon, 17 Nov 2014 15:45:12 +0000 (16:45 +0100)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Wed, 25 Feb 2015 12:24:15 +0000 (13:24 +0100)
Change-Id: I89d03b06c97de61f06bad3c483c9cf7d4442c3dd

src/framework/include/dpl/test/test_results_collector_commons.h
src/framework/src/test_results_collector_commons.cpp
src/framework/src/test_results_collector_html.cpp
src/framework/src/test_results_collector_summary.cpp
src/framework/src/test_results_collector_xml.cpp

index 6961f4e..606f8c3 100644 (file)
@@ -44,6 +44,7 @@ namespace Test {
 // Get duration as a fraction of millisecond (max precision is 1 microsecond)
 double get_milliseconds (const std::chrono::system_clock::duration& performanceTime);
 
+std::string CollectorFileHelp(const std::string &defaultFilename);
 bool ParseCollectorFileArg(const std::string &arg, std::string &filename);
 
 } // namespace Test
index e821f16..701fd36 100644 (file)
@@ -33,6 +33,12 @@ double get_milliseconds (const std::chrono::system_clock::duration& performanceT
             (performanceTime).count()))/1000.0;
 }
 
+std::string CollectorFileHelp(const std::string &defaultFilename)
+{
+    return "--file=<filename> - name of file for output\n"
+           "                    default - " + defaultFilename + "\n";
+}
+
 bool ParseCollectorFileArg(const std::string &arg, std::string &filename)
 {
     const std::string argname = "--file=";
index 93698cc..0ca0475 100644 (file)
@@ -66,8 +66,7 @@ bool HtmlCollector::Configure()
 
 std::string HtmlCollector::CollectorSpecificHelp() const
 {
-    return "--file=<filename> - name of file for output\n"
-           "                    default - index.html\n";
+    return CollectorFileHelp(DEFAULT_HTML_FILE_NAME);
 }
 
 void HtmlCollector::Start()
index 74cb680..1fe83fe 100644 (file)
@@ -48,8 +48,7 @@ TestResultsCollectorBase* SummaryCollector::Constructor()
 
 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)
index 7eea2b7..ed4a6e5 100644 (file)
@@ -99,8 +99,7 @@ bool XmlCollector::Configure()
 
 std::string XmlCollector::CollectorSpecificHelp() const
 {
-    return "--file=<filename> - name of file for output\n"
-           "                    default - results.xml\n";
+    return CollectorFileHelp(DEFAULT_XML_FILE_NAME);
 }
 
 void XmlCollector::Start()