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
This commit is contained in:
parent
87a5b2b4be
commit
96b85e9457
11
HACKING
11
HACKING
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue