Commit Graph

18 Commits

Author SHA1 Message Date
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 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 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 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 d9f5959165 Don't use deprecated Qt functions 2019-07-07 12:15:20 +02:00
Martchus 64473df5ba Adapt to changes in c++utilities 2019-06-10 22:48:26 +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 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 72e1377c43 Add tests for syncthingctl 2018-05-01 01:16:20 +02:00
Martchus 2f26543acf Add app to automatically setup basic env for manual testing 2018-01-27 16:47:10 +01: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 e4a382e4e8 Improve connector tests
Region coverage now by 74.4417%
2017-07-09 23:34:43 +02:00
Martchus 732a5fdd8d Apply clang-format 2017-05-01 03:34:43 +02:00
Martchus 40b8713ba6 Move test helper to separate library
Allows to share common test helper code
between tests for different components
2017-04-01 16:56:36 +02:00