Remove CSV collector 89/28689/5
authorMarcin Niesluchowski <m.niesluchow@samsung.com>
Mon, 13 Oct 2014 08:24:02 +0000 (10:24 +0200)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Tue, 21 Oct 2014 09:53:14 +0000 (11:53 +0200)
Change-Id: Iae8c4bbb7cfd415e228426885f224412122ce52f

tests/framework/include/dpl/test/test_runner.h
tests/framework/src/test_results_collector.cpp

index 9728d58..e43159b 100644 (file)
@@ -312,7 +312,6 @@ typedef DPL::Singleton<TestRunner> TestRunnerSingleton;
  *     - text
  *     - html
  *     - xml
- *     - csv
  */
 
 #define RUNNER_PERF_TEST_BEGIN(maxTime)                                                \
index 31733f4..b459d92 100644 (file)
@@ -829,75 +829,6 @@ TestResultsCollectorBase* XmlCollector::Constructor()
     return new XmlCollector();
 }
 
-class CSVCollector :
-    public TestResultsCollectorBase
-{
-  public:
-    static TestResultsCollectorBase* Constructor();
-
-  private:
-    CSVCollector() {}
-
-    virtual void Start()
-    {
-        printf("GROUP;ID;RESULT;REASON;ELAPSED [s];EXPECTED [s]\n");
-    }
-
-    virtual void CollectCurrentTestGroupName(const std::string& name)
-    {
-        m_currentGroup = name;
-    }
-
-    virtual void CollectResult(const std::string& id,
-                               const std::string& /*description*/,
-                               const FailStatus::Type status = FailStatus::NONE,
-                               const std::string& reason = "",
-                               const bool& isPerformanceTest = false,
-                               const std::chrono::system_clock::duration& performanceTime = std::chrono::microseconds::zero(),
-                               const std::chrono::system_clock::duration& performanceMaxTime = std::chrono::microseconds::zero())
-    {
-        std::string statusMsg = "";
-        switch (status) {
-        case TestResultsCollectorBase::FailStatus::NONE:
-            statusMsg = "OK";
-            if (isPerformanceTest) {
-                statusMsg.append(";;");
-                std::ostringstream ostr;
-                ostr << performanceTime.count();
-                statusMsg.append(ostr.str());
-                if (performanceMaxTime <= std::chrono::microseconds::zero()) {
-                    statusMsg.append(";");
-                    ostr.str("");
-                    ostr << performanceMaxTime.count();
-                    statusMsg.append(ostr.str());
-                }
-            }
-            break;
-        case TestResultsCollectorBase::FailStatus::FAILED: statusMsg = "FAILED";
-            break;
-        case TestResultsCollectorBase::FailStatus::IGNORED: statusMsg =
-            "IGNORED";
-            break;
-        case TestResultsCollectorBase::FailStatus::INTERNAL: statusMsg =
-            "FAILED";
-            break;
-        default:
-            Assert(false && "Bad status");
-        }
-        printf("%s;%s;%s;%s\n",
-               m_currentGroup.c_str(),
-               id.c_str(),
-               statusMsg.c_str(),
-               reason.c_str());
-    }
-
-    std::string m_currentGroup;
-};
-
-TestResultsCollectorBase* CSVCollector::Constructor()
-{
-    return new CSVCollector();
-}
 }
 
 void TestResultsCollectorBase::RegisterCollectorConstructor(
@@ -946,9 +877,6 @@ int RegisterCollectorConstructors()
         "html",
         &HtmlCollector::Constructor);
     TestResultsCollectorBase::RegisterCollectorConstructor(
-        "csv",
-        &CSVCollector::Constructor);
-    TestResultsCollectorBase::RegisterCollectorConstructor(
         "xml",
         &XmlCollector::Constructor);