IODA Bundle
TestRunner.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 1996-2012 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 /// \file TestRunner.h
12 ///
13 /// @author Piotr Kuchta, ECMWF, Feb 2009
14 
15 #ifndef TestRunner_H
16 #define TestRunner_H
17 
18 #include "odc/CommandLineParser.h"
19 #include "eckit/filesystem/PathName.h"
20 
21 namespace odc {
22 namespace tool {
23 namespace test {
24 
25 class TestRunner {
26 public:
28  virtual ~TestRunner ();
29 
30  size_t numberOfFailed() { return failed_.size(); }
31 
32  void run();
33 
34 private:
35  typedef std::pair<std::string, std::string> FailedTest;
36  typedef std::map<std::string, std::vector<std::string> > Suites;
37 
38  void readConfig(const eckit::PathName fileName);
39  void runTests(const TestCases &tests);
40 
41  void smslabel(const std::string &);
42 
44 
46  std::vector<FailedTest> failed_;
47  std::stringstream runningTimes_;
48  std::stringstream xml_;
49 
51  std::string label_;
52 };
53 
54 } // namespace test
55 } // namespace tool
56 } // namespace odc
57 
58 #endif
std::pair< std::string, std::string > FailedTest
Definition: TestRunner.h:35
void smslabel(const std::string &)
Definition: TestRunner.cc:193
std::stringstream runningTimes_
Definition: TestRunner.h:47
TestRunner(CommandLineParser &)
Definition: TestRunner.cc:37
void runTests(const TestCases &tests)
Definition: TestRunner.cc:119
std::map< std::string, std::vector< std::string > > Suites
Definition: TestRunner.h:36
std::stringstream xml_
Definition: TestRunner.h:48
void readConfig(const eckit::PathName fileName)
Definition: TestRunner.cc:173
CommandLineParser clp_
Definition: TestRunner.h:43
std::vector< FailedTest > failed_
Definition: TestRunner.h:46
std::vector< TestCase * > TestCases
Definition: TestCase.h:42
Definition: ColumnInfo.h:23