Commit Graph

43 Commits

Author SHA1 Message Date
Martin Hořeňovský 72f0372664
Add tests for CMake configure toggles passing to Catch2 build 2022-02-20 19:32:30 +01:00
Martin Hořeňovský 33ffc3b6fc
Allow passing compile-time configuration options through CMake 2022-02-18 11:15:08 +01:00
Martin Hořeňovský 7a2f9f4633
Extend checkLicense.py to also check tests 2022-01-29 13:10:54 +01:00
Martin Hořeňovský 4ff8b27bb6
Cleanups output normalization in ApprovalTests
Removed:
 * NaN normalization
 * INFINITY normalization
 * errno normalization
 * Completely unused duration regex

Tests using these macros should be tagged `[approvals]`
so they are not run as part of approval tests.

Also simplified regex for the test's executable filename,
and hidden some tests relying on nullptr normalization.
2022-01-27 21:11:51 +01:00
Martin Hořeňovský dc86d51af2
Update version string to mention Catch2 2022-01-27 20:15:05 +01:00
Martin Jeřábek ccd67b293d Add support for multiple parallel reporters
This requires a bunch of different changes across the reporter
subsystem.

* We need to handle multiple reporters and their differing
  preferences in `ListeningReporter`, e.g. what to do when
  we mix reporters that capture and don't capture stdout.
* We need to change how the reporter is given output and
  how we parse reporter's output destination from CLI.
* Approval tests need to handle multireporter option
2022-01-01 14:02:23 +01:00
Alan Jowett cde26de803
Add buildAndTest.cmd for Windows users (#2338)
* Add buildAndTest.cmd for Windows users

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2021-12-18 23:52:35 +01:00
Alan Jowett d30d0c01a7 Disable JIT debug for ctest.ext
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2021-12-16 12:17:52 +01:00
Martin Hořeňovský c097609115
Cleanup release scripts a bit 2021-12-02 11:48:50 +01:00
Martin Hořeňovský 9d6fffb922
Remove no longer used Python scripts 2021-12-02 11:48:28 +01:00
Martin Hořeňovský c4df47c246
Approvals normalize paths with both backward and forward slash 2021-11-13 22:10:25 +01:00
Martin Hořeňovský de67278e14
JUnit reporter uses only 3 decimal places when reporting durations
We used to use whatever precision we ended up having from C++'s
stdlib. However, some relatively popular tools, like Jenkins,
use Maven SureFire XML schema to validate JUnit test reports, and
Maven SureFire schema requires the duration to have at most 3
decimal places.

For compatibility, the JUnit reporter will now respect this
limitation.

Closes #2221
2021-10-10 22:10:48 +02:00
Martin Hořeňovský 23760327ae
Fix updateVersionPlaceholder when the placeholder starts the line 2021-05-09 18:05:27 +02:00
Jozef Grajciar 037ddbc75c Fix introduced in version placeholders
Resolves #2082
2021-03-13 10:26:12 +01:00
Martin Hořeňovský 29050daec0
Add Linux and Windows CI builds with surrogate TUs 2021-02-19 23:23:00 +01:00
John Zimmermann ba81505168 Do not match exact amount of spaces for errno macro expansion in approvalTests.py
E.g. musl libc expands errno() to __errno_location() without a space between, glibc has 1 space.
2021-01-08 11:31:28 +01:00
Martin Hořeňovský 851a0e907e
Make scripts executable 2020-11-10 15:22:15 +01:00
George Xanthakis d913837a5d
Adds license check in CI 2020-11-10 00:51:24 +02:00
George Xanthakis 39e13bf530
Adds duplication check for source files in CI 2020-11-07 21:35:41 +02:00
Hannes Kaeufler f797ae7a8f Bump OpenCppCoverage to 0.9.9.0
Also modified the AppVeyor script to account for changes in what
happens to PATH with the new installer.

Closes #2059
2020-10-29 13:39:35 +01:00
Clare Macrae 40b9df567f Add missing cmake option to fix buildAndTest.sh
Note that the documentation was updated automatically, by running:
 ./tools/scripts/updateDocumentSnippets.py
2020-10-28 11:38:06 +01:00
Clare Macrae c6352c3e1f Embed the script buildAndTest.sh inside the docs 2020-10-28 11:38:06 +01:00
Clare Macrae 4035beb988 Add a script - buildAndTest.sh
This contains the currently-documented steps for a developer build.
Also, make git ignore its output directory.
2020-10-28 11:38:06 +01:00
Clare Macrae 8c3970465d Add infrastructure for embedding code samples in docs. 2020-10-28 11:38:06 +01:00
Martin Hořeňovský 60dfec559f
Provide 1 .hpp + 1 .cpp distribution of Catch2
This commits also adds a script that does the amalgamation of headers
and .cpp files into the distributable version, removes the old
`generateSingleHeader` script, and also adds a very simple compilation
test for the amalgamated distribution.
2020-09-09 13:02:50 +02:00
Richard Ash a862924601
Make scripts/updateDocumentToC.py executable.
On systems where the file system has excute permissions, this script was
not marked as executable in a clean git checkout and so could be run
without first changing the permissions. Fixed by setting the relevant
git flag.
2020-07-22 21:43:16 +02:00
Martin Hořeňovský e1a0cce82b
Remove Clara from external folder
As Clara is no longer maintained as a separate project, the
implementation was moved to the internal subfolder of top-level
folder. This removes one folder and avoids potential user confusion.

Also simplified the convenience header checking script accordingly.
2020-05-09 19:40:57 +02:00
Martin Hořeňovský db32550898
Remove catch_default_main.hpp
There are two reasons for this:

1) It is highly unlikely that someone has use for this header,
which has no customization points and only provides simplest
possible main, and cannot link the static library which also
provides a default main implementation.
2) It being a header was causing extra complications with
the convenience headers, and our checking script. This would either
require special handling in the checking script, or would break user's
of the main convenience header.

All in all, it is simpler and better in the long term to remove it,
than to fix its problems.
2020-05-09 18:00:49 +02:00
Martin Hořeňovský fe405034b8
Add script checking convenience header correctness 2020-05-06 17:53:39 +02:00
Martin Hořeňovský 0d8eeec557
Move all scripts to Python3 2020-04-29 21:28:52 +02:00
Martin Hořeňovský d3c0b36487
Update wandbox script to use https endpoint and Python3 2020-04-29 21:28:34 +02:00
Martin Hořeňovský 6e270958a2
Add development build option to CMake and enable it on CI
Development build enables warnings and and `Werror` or equivalent.
2020-02-26 16:07:26 +01:00
Martin Hořeňovský 63b7d6f98e
Improve erasure of test numbers in TAP approvals 2020-02-13 14:22:18 +01:00
Martin Hořeňovský 34bc56340d
Normalize TAP approvals to avoid massive diffs for every change 2020-02-03 20:29:36 +01:00
Martin Hořeňovský b86ab20154
OpenCppCoverage skips coverage of non-source directories
Previously, we would collect coverage data for all source files in
Catch2's directory, including tests and examples, and we would then
ask codecov.io to ignore those. With this change, OpenCppCoverage
only collects coverage data for source files in the `src/` directory.
This cuts the size of the coverage report in half, and also speeds
up the coverage collection.
2020-02-02 23:15:22 +01:00
Martin Hořeňovský 1327946785
Add all in-repo reporters to approval tests 2020-02-02 15:04:19 +01:00
Martin Hořeňovský a7b3e087a0
Fix coverage collection on AppVeyor 2020-01-31 14:44:40 +01:00
Martin Hořeňovský 827733fe81
Improve approval tests handling off tagged devel versions 2020-01-25 11:23:40 +01:00
Martin Hořeňovský acf975cab1
Separate version macros to its own header 2020-01-19 15:39:11 +01:00
Martin Hořeňovský ec7280379e
Adjust release scripts for v3 2020-01-19 15:39:11 +01:00
Martin Hořeňovský ebeeaaeec6
Reenable appveyor for CI 2019-12-16 00:15:30 +01:00
Martin Hořeňovský 91ee07e08c
Moved scripts/ to tools/scripts/ 2019-12-06 11:53:31 +01:00
Martin Hořeňovský 6eb04667ad
Move misc/ to tools/misc 2019-12-06 11:40:53 +01:00