| 
    xapian-core
    1.4.29
    
   | 
 
A test runner, which runs the tests (implemented by subclassing it) with a variety of backends. More...
#include <testrunner.h>
 Inheritance diagram for TestRunner:
 Collaboration diagram for TestRunner:Public Member Functions | |
| virtual | ~TestRunner () | 
| Virtual destructor - needed for abstract class.  More... | |
| int | run_tests (int argc, char **argv) | 
| Run all the tests.  More... | |
| virtual int | run () const =0 | 
| Run the tests with a particular backend.  More... | |
Public Attributes | |
| unsigned | properties | 
| Property bitmask.  More... | |
Protected Types | |
| enum | {  BACKEND = 0x00000001, REMOTE = 0x00000002, TRANSACTIONS = 0x00000004, POSITIONAL = 0x00000008, WRITABLE = 0x00000010, SPELLING = 0x00000020, METADATA = 0x00000040, SYNONYMS = 0x00000080, REPLICAS = 0x00000100, VALUESTATS = 0x00000200, MULTI = 0x00000400, SINGLEFILE = 0x00000800, INMEMORY = 0x00001000, GLASS = 0x00002000, COMPACT = 0x00004000, CHERT = 0x00008000, PATH = 0x00010000, REMOTETCP = 0x00020000, CHECK = 0x00040000 }  | 
Private Member Functions | |
| bool | use_backend (const std::string &backend_name) | 
| Return true iff we should use the named backend.  More... | |
| void | set_properties_for_backend (const std::string &backend_name) | 
| Set the property flags to those for the named backend.  More... | |
| void | do_tests_for_backend_ (BackendManager *manager) | 
| void | do_tests_for_backend (BackendManager &&manager) | 
| Run the tests with the specified backend.  More... | |
| void | do_tests_for_backend (BackendManager &manager) | 
Private Attributes | |
| std::string | user_backend | 
| Backend specified by the user (or empty if none was specified).  More... | |
| int | result_so_far | 
| Result of running tests so far.  More... | |
| std::string | srcdir | 
| The source directory, read from the test driver.  More... | |
A test runner, which runs the tests (implemented by subclassing it) with a variety of backends.
Definition at line 36 of file testrunner.h.
      
  | 
  protected | 
| Enumerator | |
|---|---|
| BACKEND | |
| REMOTE | |
| TRANSACTIONS | |
| POSITIONAL | |
| WRITABLE | |
| SPELLING | |
| METADATA | |
| SYNONYMS | |
| REPLICAS | |
| VALUESTATS | |
| MULTI | |
| SINGLEFILE | |
| INMEMORY | |
| GLASS | |
| COMPACT | |
| CHERT | |
| PATH | Requires get_database_path() or similar.  | 
| REMOTETCP | TCP variant of remote.  | 
| CHECK | Supports Xapian::Database::check().  | 
Definition at line 72 of file testrunner.h.
      
  | 
  virtual | 
Virtual destructor - needed for abstract class.
Definition at line 44 of file testrunner.cc.
      
  | 
  inlineprivate | 
Run the tests with the specified backend.
Definition at line 63 of file testrunner.h.
References do_tests_for_backend_().
      
  | 
  inlineprivate | 
Definition at line 67 of file testrunner.h.
References do_tests_for_backend_().
      
  | 
  private | 
Definition at line 123 of file testrunner.cc.
References backend_name(), and BackendManager::get_dbtype().
Referenced by do_tests_for_backend().
      
  | 
  pure virtual | 
Run the tests with a particular backend.
Properties of the backend can be determined by checking the settings of the flags.
Implemented in PerfTestRunner, ApiTestRunner, and SoakTestRunner.
| int TestRunner::run_tests | ( | int | argc, | 
| char ** | argv | ||
| ) | 
Run all the tests.
This should be passed the command line arguments supplied to main, and will parse them for options.
Definition at line 136 of file testrunner.cc.
References test_driver::add_command_line_option(), Xapian::Error::get_description(), test_driver::get_srcdir(), test_driver::parse_command_line(), and srcdir.
Referenced by main().
      
  | 
  private | 
Set the property flags to those for the named backend.
A description of the properties which a particular backend supports.
A list of the properties of each backend.
Definition at line 59 of file testrunner.cc.
References name, and Glass::SPELLING.
      
  | 
  private | 
Return true iff we should use the named backend.
Definition at line 47 of file testrunner.cc.
References startswith().
| unsigned TestRunner::properties | 
Property bitmask.
Definition at line 99 of file testrunner.h.
      
  | 
  private | 
Result of running tests so far.
Actually, the maximum value returned by run() so far.
Definition at line 45 of file testrunner.h.
      
  | 
  private | 
The source directory, read from the test driver.
Definition at line 49 of file testrunner.h.
      
  | 
  private | 
Backend specified by the user (or empty if none was specified).
Definition at line 39 of file testrunner.h.