Commit graph

4772 commits

Author SHA1 Message Date
Patrick Ohly 8a89391ea6 D-Bus server: refactor CmdlineWrapper
Instead of having a Cmdline and relaying some calls to it (parse(),
configWasModified()), CmdlineWrapper should derive from Cmdline,
because that will make those (and all future Cmdline) calls available
without having to write bridge code.
2012-04-30 15:24:16 +02:00
Patrick Ohly e02d296923 D-Bus testing: added test for sync output
The test uses a local sync config with just one address book. It
checks the right ordering of stdout/stderr output by merging both into
one stream. Checking D-Bus signals during the sync could (should?!)
be added.
2012-04-30 10:31:15 +02:00
Patrick Ohly e71a1bbf20 command line + local sync: fixed erroneous "Comparison impossible" output.
"Comparison impossible" was incorrectly printed after a successful
comparison on the target side of local sync.

The reason is that SIGCHLD SIG_IGN prevented reading the synccompare
return code. That code was probably added to prevent zombies when
syncevo-local-sync dies before it reads the return code of its
children.

Removing the SIGCHLD SIG_IGN fixes synccompare output issue.  A test
for the sync output will be committed next - the issue was found while
writing the test.

Code for handling zombies still needs to be added to all long-running
process (client-test, syncevo-dbus-server).
2012-04-30 10:31:15 +02:00
Patrick Ohly 4f720d1918 D-Bus testing: relaxed error message text check
If, and only if, SyncEvolution is compiled with module support,
then the error message will include information about the
loaded modules. Covered by checking the expected error with a regex
that has that additional information as an optional clause.
2012-04-30 10:31:15 +02:00
Patrick Ohly 54b167a98d GDBus libdbus: fixed use-after-free error
The code which iterates over watches used a freed list entry when the
watch callback removed the watch itself. Fixed by moving to the next
list element before invoking the callback. This still doesn't fix the
issue if the callback removes exactly the next list element.
2012-04-30 10:31:14 +02:00
Patrick Ohly df90325380 command line: fixed --luids when using daemon
The --luids parameters were not sent correctly to the
syncevo-dbus-server, the default when --daemon=no wasn't given. As a
result the operation was applied to all items instead of just the
selected ones.
2012-04-30 10:31:14 +02:00
Patrick Ohly 2e6979dda2 D-Bus testing: fixed migration tests
The syncevo-dbus-server, in contrast to the Cmdline C++ class, always
uses a keyring and then only returns "-" instead of the real password.
ScheduleWorldConfig() is no longer a global function.
2012-04-30 10:31:14 +02:00
Patrick Ohly e1b4d44f83 D-Bus testing: comment change CalDAV/CardDAV
Looking into config.h is one way of making the test optional. That'll
work for the nightly testing. A cleaner approach might be to look at
the output of backend=?.
2012-04-30 10:31:14 +02:00
Patrick Ohly 14ee6a6ffd D-Bus testing: fixed createFiles + testItemOperations
The Python createFiles() split at all occurences of a colon, instead
of just at the first one. That threw away all property values in the
vCard test data of testItemOperations.
2012-04-30 10:31:14 +02:00
Patrick Ohly 9118f54c1b D-Bus testing: use Python >= 2.7 assertions
The "if True" was used for debugging the fallback code. The check for
availability was broken, it needs to look at unittest.TestCase. Now
the code uses the fallback only if necessary, as originally intended.
2012-04-30 10:31:14 +02:00
Patrick Ohly a093c655cf D-Bus testing: fixed cut-and-paste errors
Some C++ code was not converted correctly into Python.
2012-04-30 10:31:14 +02:00
Patrick Ohly 1a446db2fd D-Bus Testing: fixed setup of ~/.sync4j (testMigrate*)
The old ~/.sync4j config must be created in the simulated home
directory and $HOME of syncevo-dbus-server/syncevolution must be set
to that directory. The latter cannot be done unconditionally (some
tests may depend on a functional EDS), so a new "own_home" flag
was added.
2012-04-30 10:31:05 +02:00
Krzesimir Nowak a13dba4c28 build: fixed creation of symlink to src/templates 2012-04-27 09:21:45 +02:00
Krzesimir Nowak 6f9fe90c0b D-Bus Testing: added testItemOperations 2012-04-27 09:21:44 +02:00
Krzesimir Nowak 570a8451d8 D-Bus Testing: added testMigrateAutoSync 2012-04-27 09:21:44 +02:00
Krzesimir Nowak dc89e6fda1 D-Bus Testing: added testMigrateContext 2012-04-27 09:21:44 +02:00
Krzesimir Nowak bdd3d63a60 D-Bus Testing: added testMigrate 2012-04-27 09:21:44 +02:00
Krzesimir Nowak e6c8fcfbb3 D-Bus Testing: added testPrintDatabases 2012-04-27 09:21:44 +02:00
Krzesimir Nowak bf342e5663 D-Bus Testing: added testConfigureSource 2012-04-27 09:21:44 +02:00
Krzesimir Nowak 567a337017 D-Bus Testing: fail the test on unexpected success of syncevolution
If we pass False to runCmdline's expectSuccess then the test should
fail, because we expected failure. Previously only checking if
application succeeded when expected was done.
2012-04-27 09:21:44 +02:00
Krzesimir Nowak 086a02317b D-Bus Testing: added testConfigureTemplates 2012-04-27 09:21:44 +02:00
Krzesimir Nowak 8e7b1ea290 D-Bus Testing: use version getters in ScheduleWorldConfig() 2012-04-27 09:21:44 +02:00
Krzesimir Nowak e6b2598766 D-Bus Testing: added tests for version getters 2012-04-27 09:21:44 +02:00
Krzesimir Nowak 16b8e3ffb5 D-Bus Testing: added version getters from SyncConfig.h 2012-04-27 09:21:44 +02:00
Krzesimir Nowak 33e481b0c7 D-Bus Testing: remove unused removeSSLCertsPaths method 2012-04-27 09:21:44 +02:00
Krzesimir Nowak 7d30a04cda D-Bus Testing: added testConfigure 2012-04-27 09:21:44 +02:00
Krzesimir Nowak 58ed4871ef D-Bus Testing: added testWebDAV 2012-04-27 09:21:43 +02:00
Krzesimir Nowak 1be7f46824 D-Bus Testing: added testSync 2012-04-27 09:21:43 +02:00
Krzesimir Nowak a2e1c7964d D-Bus Testing: added testAddSource 2012-04-27 09:21:43 +02:00
Krzesimir Nowak 003545a67d D-Bus Testing: added testPrintFileTemplatesConfig 2012-04-27 09:21:43 +02:00
Krzesimir Nowak 208f8a740d D-Bus Testing: added testPrintFileTemplates 2012-04-27 09:21:43 +02:00
Krzesimir Nowak 1f1a6bcfa6 D-Bus Testing: reorder records in ScheduleWorldConfig a bit
This was causing testPrintConfig to fail. Now matches its C++
counterpart and the test passes.
2012-04-27 09:21:43 +02:00
Krzesimir Nowak e3b788040c D-Bus Testing: added testPrintConfig 2012-04-27 09:21:43 +02:00
Krzesimir Nowak f197d3d239 D-Bus Testing: replaced uses of general assertions with specific ones.
Here - assert{True,False} using 'in' operator was replaced with
assert{In,NotIn}.
2012-04-27 09:21:43 +02:00
Krzesimir Nowak 37b28f7f3a D-Bus Testing: implement assertIn and assertNotIn for older Python
These are better than using assertTrue(foo in bar), because this
assertion will print the contents of both foo and bar.
2012-04-27 09:21:43 +02:00
Krzesimir Nowak 1d00c2f990 D-Bus Testing: added testPrintServers 2012-04-27 09:21:43 +02:00
Krzesimir Nowak 8382cb1b49 D-Bus Testing: fixed scanFiles
It behaved differently than its C++ counterpart.
2012-04-27 09:21:43 +02:00
Krzesimir Nowak 3f6acb598b D-Bus Testing: added testMatchTemplate 2012-04-27 09:21:43 +02:00
Krzesimir Nowak c4b8aea418 D-Bus Testing: also copy templates directory in setupFiles
Will be needed for TestCmdline.testMatchTemplate.
2012-04-27 09:21:43 +02:00
Krzesimir Nowak 9765bea844 D-Bus Testing: run syncevolution with the same environment as syncevo-dbus-server
Also this assures that SYNCEVOLUTION_DEBUG is actually removed from
environment if @property("debug", False) was specified for test.
2012-04-27 09:21:42 +02:00
Krzesimir Nowak 616e722e99 D-Bus Testing: added testTemplate 2012-04-27 09:21:42 +02:00
Krzesimir Nowak 2362839bc8 D-Bus Testing: added testSetupSynthesis 2012-04-27 09:21:42 +02:00
Krzesimir Nowak 67172a60ce D-Bus Testing: added testSetupFunambol 2012-04-27 09:21:42 +02:00
Krzesimir Nowak 1b0fbd16a0 D-Bus Testing: added testSetupRenamed 2012-04-27 09:21:42 +02:00
Krzesimir Nowak 0b6c0ba608 D-Bus Testing: added testSetupDefault 2012-04-27 09:21:42 +02:00
Krzesimir Nowak a9ed455bbe D-Bus Testing: used assertEqualDiff for checking stdout and stderr
It provides more readable output than assertEqual when one of strings
is multiline.
2012-04-27 09:21:42 +02:00
Krzesimir Nowak af65d4635b D-Bus Testing: used assertSilent in testSetupScheduleWorld 2012-04-27 09:21:42 +02:00
Krzesimir Nowak 8191f674b5 D-Bus Testing: added assertSilent
This will be a shortcut for checking if syncevolution produces no
output. There are plenty of tests which checks it.
2012-04-27 09:21:42 +02:00
Krzesimir Nowak 45aea5389d D-Bus Testing: added some comments to framework functions 2012-04-27 09:21:42 +02:00
Krzesimir Nowak 351806a66c D-Bus Testing: remove useless semicolons 2012-04-27 09:21:41 +02:00