Commit Graph

314 Commits

Author SHA1 Message Date
Martchus a4fc4024b5 Make tidy and coverage optional and disabled by default
* Prevent warnings about required tools being unavailable
  when tidy/coverage targets aren't desired anyways (eg.
  when packaging)
* Do not automatically execute tidy check when packaging
  in unclean environment
2017-06-20 23:38:45 +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 1e14b09e64 Fix passing application path to tests 2017-06-19 14:15:44 +02:00
Martchus 64572e6860 Add general coverage target 2017-06-19 14:01:33 +02:00
Martchus 6807d899d2 Enable source code based coverage analysis 2017-06-18 16:17:44 +02:00
Martchus 2174dc516a Allow specifying target compile options via variable 2017-06-18 16:14:45 +02:00
Martchus 67708663c8 Make ArgumentReader a class to prevent warning 2017-06-10 21:52:08 +02:00
Martchus ace077f9aa Fix INI test 2017-06-09 12:15:24 +02:00
Martchus 28f37bbbcd string to int: Allow specifying string size 2017-06-08 00:41:29 +02:00
Martchus 045c713cf5 string to int: Ignore whitespaces at beginning 2017-06-08 00:39:54 +02:00
Martchus 06f401b393 Prevent warning in swapOrder(uint16 value) 2017-06-03 17:16:52 +02:00
Martchus 5e67a9b691 Make check target depend on .clang-format file 2017-06-01 18:24:14 +02:00
Martchus 2625f82e49 ios_base::failure workaround: Ensure c++config.h is included 2017-06-01 11:29:33 +02:00
Martchus be4901ce2c Add missing #include <function>
This fixes compilation using libc++ instead
of libstdc++
2017-05-31 00:35:39 +02:00
Martchus dc73538170 Adjust ios_base::failure workaround for GCC 7
* Use new ABI under GCC >= 7
* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145
2017-05-31 00:35:31 +02:00
Martchus 5388337bcc Fix compiling tests under 32-bit arch 2017-05-30 23:56:08 +02:00
Martchus ecce539a18 Do not set global include dirs
TODO: Set include dirs on target level
2017-05-24 23:29:17 +02:00
Martchus ac348ee3b9 Find cppunit via pkg-config 2017-05-23 00:49:45 +02:00
Martchus 13ac2305d5 Allow not to link tests against cppunit 2017-05-23 00:10:27 +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 cab1a76ecf Allow printing iteratable objects
So those can be asserted using CPPUNIT_ASSERT_EQUAL
2017-05-10 23:32:48 +02:00
Martchus 3b74b817ec Add trait to test for strings 2017-05-10 23:31:28 +02:00
Martchus 7faa51c10e Test traits 2017-05-08 19:59:29 +02:00
Martchus f827c2be00 Add trait to check whether type is iteratable 2017-05-08 19:51:24 +02:00
Martchus db46948f2f Apply clang-format 2017-05-04 22:44:15 +02:00
Martchus 53ff69130c Set clang-format standard to Cpp11
* Prevents clang-format to mess up std::string
  literals like "foo"s
* As side-effect is will now use e.g. A<A<int>>
  instead of A<A<int> >
2017-05-04 22:43:20 +02:00
Martchus 04c1f98361 Format test code, too 2017-05-02 23:31:12 +02:00
Martchus 59e20b1043 Apply clang-format 2017-05-01 03:13:11 +02:00
Martchus 7e49d3994f Allow skipping creation of tidy target 2017-05-01 03:03:20 +02:00
Martchus 2ef55c439c Add tidy test 2017-05-01 02:57:58 +02:00
Martchus 7e0f65ed78 Call clang-format with all src files 2017-05-01 02:57:58 +02:00
Martchus b74327d961 Move creation of check target to BasicConfig.cmake
* So other tests like tidy check can be added
* Even if there are no tests after all, the
  check target shoudn't cause any problems
2017-05-01 02:57:58 +02:00
Martchus 0a4fc2d326 Document tidying/clang-format 2017-05-01 02:57:58 +02:00
Martchus 8799698f01 Adapt global.h.in to new coding style 2017-05-01 02:57:58 +02:00
Martchus 223ebd870b Ignore .clang-format
This symlink will be automatically created when
invoking `make tidy`. It is required because I
don't know how to specify the path for the
.clang-format file direclty.
2017-05-01 02:57:58 +02:00
Martchus d76ead0483 Add tidy target using clang-format 2017-05-01 02:57:58 +02:00
Martchus c728f0ffe0 Add hash functions for chrono objects 2017-05-01 02:54:06 +02:00
Martchus 5679460302 Simplify DateTime::fromTimeStampGmt() 2017-04-19 21:50:21 +02:00
Martchus 452954dc1f Add DateTime::exactGmtNow()
* Provides more precise wall-clock time
* Only available under UNIX so far
2017-04-19 21:48:23 +02:00
Martchus ead0fadac3 Unset version info when not available 2017-04-15 23:33:52 +02:00
Martchus 6042336038 Allow checking whether external lib is used 2017-04-15 23:20:27 +02:00
Martchus b8c2e79e3d Use meta-data provided in CMake config for version info
* Don't set custom meta-data on targets
* It isn't exported anyways
* Remove version on application target because itcauses
  CMake to create symlinks
2017-04-15 23:02:41 +02:00
Martchus be03e5ad4c Provide meta-data in CMake config 2017-04-15 22:39:41 +02:00
Martchus 412e725309 Append Git revision to version
* Append Git revision and ID of latest commit
  to version displayed via --help
* Can be turned off via option
* Has no effect if the source dir is not
  a Git checkout or Git is not installed
* Implements
  https://github.com/Martchus/tageditor/issues/13
2017-04-15 01:45:03 +02:00
Martchus 91e5a8b0b0 Show version of used libraries in --help
* Include only own libraries and Qt 5 modules
  so far
* First step to implement
  https://github.com/Martchus/tageditor/issues/13
2017-04-15 01:10:38 +02:00
Martchus bfa12a9870 Allow creation of header-only library
* Create interface target if only headers present
* Include workaround to show header files in Qt Creator
2017-04-14 23:30:46 +02:00
Martchus 2e0df8aa6a Allow linking only tests in 3rdParty macros
So tagparser tests can link against OpenSSL
for computing checksums
2017-04-08 18:29:21 +02:00
Martchus 7c189b18e1 Allow nested operation arguments
eg. syncthingctl pwd rescan
2017-04-06 00:04:30 +02:00