57 dbnames.push_back(dbname);
58 dbnames.push_back(dbname2);
66 const std::string &arg)
81 const std::string &arg)
114 dbnames.push_back(dbname);
134 SKIP_TEST(
"Test only supported for " << backend_prefix <<
" backend");
142 SKIP_TEST(
"Test not supported for " << backend_prefix <<
" backend");
169 int main(
int argc,
char **argv)
virtual Xapian::Database get_remote_database(const std::vector< std::string > &files, unsigned int timeout)
Get a remote database instance with the specified timeout.
Run multiple tests for different backends.
const std::string & get_dbtype() const
Get the database type currently in use.
This class is used to access a database, or a group of databases.
unsigned timeout
A timeout value in milliseconds.
Xapian::Database get_database(const std::vector< std::string > &files)
Get a database instance of the current type.
void skip_test_unless_backend(const std::string &backend_prefix)
static void report(const test_driver::result &r, const std::string &desc)
Print summary of tests passed, failed, and skipped.
Xapian::WritableDatabase get_writable_database(const string &dbname)
std::string get_database_path(const std::vector< std::string > &files)
Get the path of a database instance, if such a thing exists.
a generic test suite engine
static const char * dbnames
Xapian::WritableDatabase get_writable_database_again()
virtual std::string get_writable_database_path(const std::string &name)
Get the path of a writable database instance, if such a thing exists.
virtual Xapian::WritableDatabase get_writable_database(const std::string &name, const std::string &file)
Get a writable database instance.
Xapian::WritableDatabase get_named_writable_database(const std::string &name, const std::string &source)
test functionality of the Xapian API
int run_tests(int argc, char **argv)
Run all the tests.
virtual Xapian::WritableDatabase get_writable_database_again()
Create a WritableDatabase object for the last opened WritableDatabase.
Base class for backend handling in test harness.
string get_database_path(const string &dbname)
std::string get_named_writable_database_path(const std::string &name)
This class provides read/write access to a database.
Public interfaces for the Xapian library.
void XFAIL(const char *msg)
Mark a testcase as expected to fail.
BackendManager * backendmanager
backendmanager is global so that it can be accessed by individual tests.
A test runner, which runs the tests (implemented by subclassing it) with a variety of backends...
Xapian::Database get_writable_database_as_database()
bool startswith(const std::string &s, char pfx)
std::string get_compaction_output_path(const std::string &name)
int main(int argc, char **argv)
Xapian::Database get_database(const string &dbname)
#define SKIP_TEST(MSG)
Skip the current testcase with message MSG.
void XFAIL_FOR_BACKEND(const std::string &backend_prefix, const char *msg)
void skip_test_for_backend(const std::string &backend_prefix)
Various handy helpers which std::string really should provide.
int run() const
Run the tests with a particular backend.
virtual Xapian::Database get_writable_database_as_database()
Create a Database object for the last opened WritableDatabase.
virtual std::string get_compaction_output_path(const std::string &name)
Get a path to compact a database to.
Xapian::Database get_remote_database(const string &dbname, unsigned int timeout)