Commit graph

14 commits

Author SHA1 Message Date
Jocelyn Turcotte
b26db062d2 Fix the UNIT_TESTING build on Windows
- Put all tests in the bin directory so that DLLs can be loaded
- Add missing exports
- Skip tests that use code depending on zlib
- The "GMT" timezone is named differently, use the int constructor instead

5 tests are still failing, it's not really worth fixing at the moment
since no developper is currently using Windows as its main platform.
2017-02-14 14:32:41 +01:00
Jocelyn Turcotte
f1e9be4fa8 Don't use the StopWatch for each job in production builds #5456
This accounted for more than 10% of the peak memory usage while only
providing value through the debugging log.
2017-01-26 17:13:54 +01:00
Jocelyn Turcotte
b7ff4a76e8 Add TestSyncEngine and TestSyncFileStatusTracker auto tests
To be able to test the SyncEngine efficiently, a set of server
mocking classes have been implemented on top of QNetworkAccessManager.

The local disk side hasn't been mocked since this would require adding
a large abstraction layer in csync. The SyncEngine is instead pointed
to a different temporary dir in each test and we test by interacting
with files in this directory instead.

The FakeFolder object wraps the SyncEngine with those abstractions
and allow controlling the local files, and the fake remote state
through the FileModifier interface, using a FileInfo tree structure
for the remote-side implementation as well as feeding and comparing
the states on both side in tests.

Tests run fast and require no setup to be run, but each server feature
that we want to test on the client side needs to be implemented in
this fake objects library. For example, the OC-FileId header isn't
set as of this commit, and we can't test the file move logic properly
without implementing it first.

The TestSyncFileStatusTracker tests already contain a few QEXPECT_FAIL
for what I esteem being issues that need to be fixed in order to catch
up on our test coverage without making this patch too huge.
2016-08-17 15:39:30 +02:00
Daniel Molkentin
d8275cd4e1 Use identical User Agents for csync and the Qt parts
Also, use the mirall version for ocsync.

Currently, the csync engine part and the Qt part have different UAs,
and this makes debugging (i.e. reading access logs) difficult. On
top, we haven't increased the ocsync version number in ages. So
as a consequence, I think it would be the best to have ocsync
and the rest share the same version number, and make them identify
with the same user agent.

To ease debugging for our side, we'll still append "(csyncoC)"
for calls made by csync.
2015-04-16 20:58:51 +02:00
Jocelyn Turcotte
1ac523ec01 Output libocsync and libowncloudsync in the bin directory
Windows finds DLLs using PATH or the directory of the process'
executable. By outputing those dependend DLLs together with
owncloud.exe, the developer only need to have OpenSSL's bin
and the qtkeychain build directory in his PATH to let the
dynamic linker find them.

As the documentation of RUNTIME_OUTPUT_DIRECTORY points out,
this only affects windows as other platforms don't consider
libraries as runtime targets.
2015-02-04 15:00:22 +01:00
Jocelyn Turcotte
43a51c1bef Fix the MinGW build
- qtkeychain isn't necessarily in a qt5keychain subdirectory.
- Explicitly add OpenSSL to the include directories
- Make sure that the USE_OUR_OWN_SQLITE3 code is initialized
  for csync by calling find_package.
2015-02-04 14:50:38 +01:00
Markus Goetz
34b31c0146 CSync: Fix test compile
The previously applied pull request apparantly broke the compile
because it re-ordered entries in the CMakeLists
2014-06-05 14:22:10 +02:00
Kuba Serafinowski
62ea6f316f don't look for CMocka if we're not building unit tests 2014-06-04 00:10:16 +03:00
Klaas Freitag
8e7e2dded8 Bump csync version. 2014-02-04 16:23:44 +01:00
Klaas Freitag
f32d901653 Remove ocsyncs config which is unused in the owncloud client. 2014-01-24 13:43:05 +01:00
Klaas Freitag
0b680ef90e Removed the csync documentation as it is not longer used here. 2014-01-24 13:43:05 +01:00
Klaas Freitag
05b81bc7d8 rename csync/doc to csync/csync_doc to satisfy cmake.
CMake throws a warning if there are two subdirs with the same name.
2014-01-20 16:19:30 +01:00
Olivier Goffart
c7227297af Make it compile with the merge of csync mirall 2014-01-15 12:20:03 +01:00
Olivier Goffart
bf7ca60bec Move csync in order to merge it with mirall 2014-01-13 14:39:50 +01:00
Renamed from CMakeLists.txt (Browse further)