Commit Graph

56 Commits

Author SHA1 Message Date
Martchus 047a4e461e Allow refreshing root in file browser 2024-05-01 15:58:09 +02:00
Martchus 982f04bbaa Apply clang-format 2024-04-06 19:39:38 +02:00
Martchus da3ad3347d Fix remaining problems preventing unity builds to work
* Avoid multiple definitions of `centerObj()`; this was very bad anyway
* Include `c++utilities/tests/testutils.h` upfront so the formatting
  operators are included before CppUnit
2024-01-30 23:11:00 +01:00
Martchus 0f1bcae534 Fix build with c++utilities change to add header for compile definitions
* Add include directory for testhelper library manually as using the
  imported target was not possibly
* Fix visibility when using libsyncthing in syncthingwidgets
* Update changed global headers along the way
2024-01-30 22:35:47 +01:00
Martchus 66a8dda244 Improve test setup
* Improve code for reading environment variables
* Make tests work when the temp directory is not `/tmp` because e.g. `TEMP`
  has been set or tests are executed under Windows
2023-08-02 17:36:26 +02:00
Martchus e4bbe852bd Avoid CMake deprecation warning by bumping version 2023-07-23 21:05:22 +02:00
Martchus b5d81eefc6 Avoid remaining symlinks for testfiles 2023-02-27 22:14:35 +01:00
Martchus 037c5a309b Fail tests early when Syncthing exists unexpectedly or cannot be started at all
Before tests ran until a timeout was reached and failed not with a clear
error message stating the root cause. This is now the case and can be
tested by setting `SYNCTHING_PATH` to e.g. false/true or a non-existing
binary.

This may help with the test issue mentioned in
https://github.com/Martchus/syncthingtray/issues/144 although I could
never reproduce the concrete error message myself.
2022-10-29 21:22:21 +02:00
Martchus 99f8442567 Do not pretend `SyncthingTestInstance` inherits from `QObject` 2022-10-29 21:05:13 +02:00
Martchus 3b50d78f1e Use resource lock to avoid concurrent execution of tests requiring Syncthing test instance
This is likely the cleaner approach compared to just enforcing a serial run
for the CLI test.
2021-10-13 00:14:35 +02:00
Hannah Rittich 2968898195 Allow finding of packages in namespaces 2021-10-03 02:07:18 +02:00
Martchus 7e7eab9eb8 Hardcode `127.0.0.1` in test setup instead of relying on DNS resolution of `localhost`
This should not be necessary but apparently helps with test failures
reported in https://github.com/Martchus/syncthingtray/issues/105.
2021-08-09 13:05:12 +02:00
Martchus 0ef3b80447 Fix typos found via `codespell --skip .git -w` 2021-07-03 19:29:49 +02:00
Martchus f7b977d919 Fix SyncthingTestInstance 2021-06-17 21:01:06 +02:00
Martchus 9ce9b11ba4 Use Boost.Process for launcher to cope with further sub processes
* Use a process group / job object via Boost.Process to be able to
  terminate sub processes as well
* Do not try to stop the process gracefully under Windows by posting
  WM_CLOSE because this has no effect on Syncthing anyways
* See https://github.com/Martchus/syncthingtray/issues/94
2021-06-16 22:44:48 +02:00
Martchus 975e86c895 Allow backend libraries to be used from other projects
So far the backend libraries' include paths were relative within this
repository. This means the header files could not be used at their
installed location.

This change replaces them with "<>" includes to fix that problem and adds
a new include directory so building everything at once still works.

With this change it should be easier to actually split some parts into
another repository if this one would become too big.
2021-01-25 19:48:11 +01:00
Martchus 1bf58bf38d Apply cmake-format and clang-format 2020-12-17 17:52:02 +01:00
Martchus 49bbebd1ad Allow configuring package suffix for qtutilities individually 2020-10-23 17:03:57 +02:00
Martchus 0b5fb14931 Remove overspecification of Qt version in documentation and comments 2020-09-04 01:13:46 +02:00
Martchus c103174609 Make desktop files for Plasma integration from template
* Avoid redundant meta-data
* Take target suffix into account
2020-02-14 23:14:50 +01:00
Martchus 133dbacb5d Use consistent order for visibility attribute 2020-01-29 18:51:10 +01:00
Martchus 2d704cf765 Fix missing export macros 2020-01-10 18:01:37 +01:00
Martchus 131050b275 Don't use functions deprecated in Qt 5.14.0 2019-12-18 00:07:52 +01:00
Martchus d9f5959165 Don't use deprecated Qt functions 2019-07-07 12:15:20 +02:00
Martchus dc7d9b815f Adapt to changes in c++utilities 2019-06-14 19:15:26 +02:00
Martchus 64473df5ba Adapt to changes in c++utilities 2019-06-10 22:48:26 +02:00
Martchus a30853cfeb Apply cmake-format and clang-format 2019-05-04 22:10:37 +02:00
Martchus d88df866d2 Adapt to c++utilities v5 2019-05-04 21:05:21 +02:00
Martchus 326f03b604 Apply cmake-format 2019-02-06 17:36:14 +01:00
Martchus 2370fe1ef5 Let CMake generate code for test application 2019-01-13 22:16:23 +01:00
Martchus f380732068 Don't use std::function for handlers in testcode
Just use the lambdas directly and make if(handler) check
only if possible.
2018-10-21 21:07:43 +02:00
Martchus 703225b410 Fix/improve CLI tests
* Adapt to interleaved output previously enabled in SyncthingTestInstance
* Make it work when verbose output for debugging is enabled
* Show which status line didn't match in case of an failure
* Disable flaky rescan tests in release mode
2018-10-20 23:48:24 +02:00
Martchus 407514289a Fix typo infos -> info 2018-10-18 23:34:02 +02:00
Martchus 545465b52a testutils: Check first for failure 2018-10-18 23:25:24 +02:00
Martchus c249414411 Improve SyncthingTestInstance
* Show Syncthing's output interleaved with the test output
  by default
* Show Syncthing start parameter
2018-10-14 22:48:52 +02:00
Martchus db6c8af414 Debug Syncthing crashes during testruns 2018-10-12 00:09:02 +02:00
Martchus 7611ad1c8e Propose use of SYNCTHING_TEST_TIMEOUT_FACTOR 2018-09-06 22:04:22 +02:00
Martchus 7e2eea8523 tests: Increase timeouts, use timeout factor everywhere 2018-08-05 15:20:21 +02:00
Martchus 72e1377c43 Add tests for syncthingctl 2018-05-01 01:16:20 +02:00
Martchus 754cd0c2e1 Allow printing current config 2018-04-01 20:21:51 +02:00
Martchus 914aac6e39 Make bash completion faster by requesting only config 2018-02-19 03:22:47 +01:00
Martchus 26c8af598e Flag the test for testhelper as manual test
So it is not executed on eg. `make check`.
2018-01-27 23:58:46 +01:00
Martchus 2f26543acf Add app to automatically setup basic env for manual testing 2018-01-27 16:47:10 +01:00
Martchus 13b5dbea18 Prevent including HelperMacros.h when using testhelper for CLI 2017-10-07 22:44:58 +02:00
Martchus a302bf8abf testhelper: Fix documentation 2017-09-30 18:51:50 +02:00
Martchus 30347f1845 Make testhelper usable for the CLI
TODO: Generalize wait... methods and move them to
qtutilities.
2017-09-30 18:46:27 +02:00
Martchus 69ffaeb1f3 Apply tidy after updating to clang-format 5.0.0
The behavior of clang-format slightly changed in Clang 5.0.0:
http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#clang-format
2017-09-17 21:48:15 +02:00
Martchus 1ed4905139 tests: Allow specifying timeout factor
The timeout factor is read from environment
variable SYNCTHING_TEST_TIMEOUT_FACTOR
2017-07-14 16:23:32 +02:00
Martchus 2c3ad1d932 test helper: Fix including syncthingprocess.h 2017-07-11 22:57:35 +02:00
Martchus f95ad68a3a Link testhelper against connector, remove global includes 2017-07-11 22:53:45 +02:00