diff options
author | Patrick Ohly <patrick.ohly@gmx.de> | 2006-11-03 17:40:34 +0000 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@gmx.de> | 2006-11-03 17:40:34 +0000 |
commit | 96b85e9457cec5c599c8708fdf831002377dc4a4 (patch) | |
tree | d021def0d5c90b5f8ae4faae3085d7818086298c | |
parent | 87a5b2b4be6c4e3b7acf6c3c4407e7c0caaaa724 (diff) |
allow running multiple tests by specifying them on the command line
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@279 15ad00c4-1369-45f4-8270-35d70d36bdcd
-rw-r--r-- | HACKING | 11 | ||||
-rw-r--r-- | src/TestMain.cpp | 10 |
2 files changed, 17 insertions, 4 deletions
@@ -79,9 +79,14 @@ can be set via TEST_EVOLUTION_DELAY=<seconds>. The Sync4j 2.3 server needs a delay of around 20 seconds to work correctly. -The first parameter of the "test" program can be used -to select specific tests, like this: - ./TestEvolution ContactSync::testItems +When invoking TestEvolution without parameters all +tests will be run. Otherwise each test listed on the +command line will be run: + ./TestEvolution ContactSync::testItems \ + ContactSync::testCopy + +For a list of available tests see the TestEvolution.cpp +source code. "make valgrind" runs the same tests inside valgrind [http://www.valgrind.org]. A suppression file is diff --git a/src/TestMain.cpp b/src/TestMain.cpp index db09fd40..534119a5 100644 --- a/src/TestMain.cpp +++ b/src/TestMain.cpp @@ -164,7 +164,15 @@ int main(int argc, char* argv[]) try { // Run the tests. - runner.run(argc > 1 ? argv[1] : "", false, true, false); + if (argc <= 1) { + // all tests + runner.run("", false, true, false); + } else { + // run selected tests individually + for (int test = 1; test < argc; test++) { + runner.run(argv[test], false, true, false); + } + } // Return error code 1 if the one of test failed. return syncListener.hasFailed() ? 1 : 0; |