Commit Graph

44 Commits

Author SHA1 Message Date
Martchus 61edf58c3e Fix workingCopyPathMode 2018-10-06 16:18:39 +02:00
Martchus 5356d793fc Make all tests pass under Windows
* Workaround some issues
* Disable some tests (better than not running tests
  at all)
2018-10-03 22:37:55 +02:00
Martchus 8e3c40abb5 Make conversion from multi byte to wide string generic 2018-10-03 21:26:41 +02:00
Martchus 25ef4e28a2 Make tests compile under Windows 2018-09-30 13:55:30 +02:00
Martchus 826c43ef8b Include missing cerrno 2018-08-12 22:17:09 +02:00
Martchus d0bf2fb390 Add more debug output to TestApplication::workingCopyPathMode 2018-08-11 22:21:48 +02:00
Martchus 2347677495 Adjust name of working copy until unique if unable to override 2018-07-28 20:51:25 +02:00
Martchus f50321f414 Improve coding style in testutils.cpp 2018-07-28 20:00:28 +02:00
Martchus 0f45817956 Make output of workingCopyPathMode() even more verbose 2018-07-28 19:39:11 +02:00
Martchus c53472fdce Make failing TestApplication::workingCopyPathMode() more verbose 2018-07-28 15:59:31 +02:00
Martchus 52bf075317 Move creation of srcdirref and testfiles dir to BasicConfig
Those make testing more convenient and are also useful when
there's no test target, eg. when testing syncthingtray with
mocked configuration.
2018-05-01 23:59:28 +02:00
Martchus df7a3ee93c Apply clang-format from LLVM 6 2018-03-24 17:00:30 +01:00
Martchus 3a768508fd Use src dir as fallback unless arg *and* env var specified 2018-02-03 17:16:30 +01:00
Martchus ab42e9d96c Improve documentation of testutils 2017-11-12 16:58:53 +01:00
Martchus cc5d6052f5 test application: Allow to skip argument parsing 2017-11-12 16:17:08 +01:00
Martchus 924481b033 Fix platform check for readFallback...() functions 2017-11-01 19:30:55 +01:00
Martchus 6fd2603cff teat application: Prevent copying dir entries 2017-11-01 19:17:57 +01:00
Martchus 34f3ebb45d Let tests find the application path without extra args
Currently the path of the application to be tested always had to
be specified either manually using the -a argument or by running
the tests via the build system targets. The first option is annoying
and the second option not so nice when using Qt Creator and the
debugger.

This commit makes tests assume the application to be tested is
called like the test executable itself, just without "_tests"-suffix.
2017-10-30 23:03:43 +01:00
Martchus 2bb4aa36a4 Let tests find the testfiles from sources without extra args
Currently the path of the testfiles always had to be specified
either manually using the -p argument or by running the tests
via the build system targets. The first option is annoying and
the second option not so nice when using Qt Creator and the
debugger.

This commit allows tests to find the testfiles from the source
directory automatically (as fallback). This is achieved by
creating a file containing the path of the source directory
with CMake. Note that this file can only be found if the working
directory is set to the binary directory (default in Qt Creator).
2017-10-30 23:01:07 +01:00
Martchus dab05bdade Improve coding style in test utilities 2017-10-24 01:02:07 +02:00
Martchus e52fd5a4af 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:45:23 +02:00
Martchus 57d5d04d9f Merge prof data of subprocesses created when executing tests
So coverage is accounted correctly when tests create subprocesses
of the application to be tested using execApp().
2017-06-20 23:19:49 +02:00
Martchus 3bc1756425 Add Argument::varValueCount 2017-05-19 00:12:07 +02:00
Martchus 2e98e3bd11 testutils: Fix finding testfiles dir in pwd 2017-05-19 00:08:27 +02:00
Martchus 18fef23724 testutils: Add execHelperApp() 2017-05-19 00:07:38 +02:00
Martchus db46948f2f Apply clang-format 2017-05-04 22:44:15 +02:00
Martchus 59e20b1043 Apply clang-format 2017-05-01 03:13:11 +02:00
Martchus 52a76a7bd2 Show warning when a testfile could not be located
TODO: Would throwing an exception instead break
something?
2017-03-12 20:25:06 +01:00
Martchus c13eee6fcc Add workingCopyPathMode() to be able to skip actual copy 2017-02-04 20:16:50 +01:00
Martchus 33d368397f Make use of newly introduced string builder 2017-01-27 18:51:54 +01:00
Martchus 1a4087abbc Use async IO in TestApplication::execApp()
rather than multiple threads
2016-08-15 22:35:37 +02:00
Martchus ed527021f9 Improve logging when testing applications 2016-08-05 01:43:46 +02:00
Martchus 994181cbf9 Improve utilities for testing tageditor CLI 2016-08-03 17:31:28 +02:00
Martchus 17d22be584 Support testing applications 2016-07-30 22:34:31 +02:00
Martchus 8efe38dadf Improve details in the build system
- add target to run cross compiled Windows binaries with wine
- quit tests if --help has been specified
2016-07-16 23:04:22 +02:00
Martchus 980794066b Provide workaround for GCC Bug 66145 2016-06-14 22:53:19 +02:00
Martchus 526cbc5282 Rewrite argument parsing 2016-06-13 00:00:36 +02:00
Martchus d28d477ffe Complete generation of API doc
- Use README.md for main page
- Add install target for API doc
- Improve some doc comments
2016-06-10 22:59:22 +02:00
Martchus 7bb6875ded Allow testing particular units 2016-05-23 00:03:55 +02:00
Martchus bd0cbd5802 reduce code duplication in build system
- get rid of qmake project file
- provide CMake modules for common tasks
- provide templates for *.desktop files
2016-04-16 02:11:05 +02:00
Martchus 29c0db0090 mingw-w64: workingCopyPath is (currently) not supported 2016-02-27 01:18:54 +01:00
Martchus 7e780d647a ensure subdirs exist 2016-02-17 20:21:11 +01:00
Martchus af5b879506 utilize creation of working copies for tests 2016-02-09 02:21:42 +01:00
Martchus 9abe04ce06 make test code public to simplify creation of tests in other projects 2016-02-06 16:55:28 +01:00