forked from catchorg/Catch2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v3.7.1 === Improvements === * Applied the JUnit reporter's optimization from last release to the SonarQube reporter * Suppressed `-Wuseless-cast` in `CHECK_THROWS_MATCHES` (catchorg#2904) * Standardize exit codes for various failures * Running no tests is now guaranteed to exit with 2 (without the `--allow-running-no-tests` flag) * All tests skipped is now always 4 (...) * Assertion failures are now always 42 * and so on === Fixes === * Fixed out-of-bounds access when the arg parser encounters single `-` as an argument (catchorg#2905) === Miscellaneous === * Added `catch_config_prefix_messages.hpp` to meson build (catchorg#2903) * `catch_discover_tests` now supports skipped tests (catchorg#2873) * You can get the old behaviour by calling `catch_discover_tests` with `SKIP_IS_FAILURE` option. # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCgAdFiEE8QyLZSqAHw/oZQgX3kgwe4sNOBoFAmbpQnMACgkQ3kgwe4sN # OBpa1Q//UbNsxKpLU7cKzCr3kEOOc2RsryS5foHYRs+mhUzOFYf4y1HkSdvzc3TV # ZUI8sA5FA1OVO7JtCSpgzizF5vGiOunDFGgroSw9kIxsX0KtHugksNgQcU7QeFEf # 6KqtKb4/tmRryuyoHZTdWMxBGpB4dtc3zy1Yq+ebe8k52neBmilb80Mz9KbuQ4vT # QAXz7xWiZukHyxosmKZe5kxDLF3Ck5iVCvvUJu9iwiE6Ua8TIJgs+sOFApsQztmu # 5hwrmajqZGLB65RQe4G6AXScNLGnzRTJwByR5fg+YFZQmUdjSE0oQ6rd2Ni9qk5c # QUOPBAVA2A3rahnV3k9bY6SapFjeTZlO4/go9eSzswc2CU7LCX0jRME5d+oW6YJ4 # H0XgacVYM362Exd4hKsSplfuvwkRi1irlnGxHpTvBLBp1czJgUnQV1lwsncaiQFx # IZfxiqot+V0fPEweVkgHOwf175o9SLLZka6546MFgSvWY8yEEMnl3nLrmeHhCFPq # 70MdKcj/Qbzkzd5PTSuUoUhxIFZJMzsszj9b0pdGlCb5ObRMcN0UHKG9nVNXWTmn # tWnukCdzGHsZzaHjH/J0IY8P9ANNjAb5xtROzuF5TmE6h+D5J6kwxGTqZoCyqmC/ # FyPPf1WYkrU2qj+ms7SbdyGlE7s1w8VF/7p3/EKwoE2fpZk/9WM= # =lDEO # -----END PGP SIGNATURE----- # gpg: directory '/c/Users/Ty Rymer/.gnupg' created # gpg: Signature made Tue Sep 17 10:48:51 2024 WEST # gpg: using RSA key F10C8B652A801F0FE8650817DE48307B8B0D381A # gpg: Can't check signature: No public key
- Loading branch information
Showing
200 changed files
with
8,787 additions
and
3,837 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
# Note: Alas, `Checks` is a string, not an array. | ||
# Comments in the block string are not parsed and are passed in the value. | ||
# They must thus be delimited by ',' from either side - then they are | ||
# harmless. It's terrible, but it works. | ||
Checks: >- | ||
clang-diagnostic-*, | ||
clang-analyzer-*, | ||
-clang-analyzer-optin.core.EnumCastOutOfRange, | ||
bugprone-*, | ||
-bugprone-unchecked-optional-access, | ||
,# This is ridiculous, as it triggers on constants, | ||
-bugprone-implicit-widening-of-multiplication-result, | ||
-bugprone-easily-swappable-parameters, | ||
,# Is not really useful, has false positives, triggers for no-noexcept move constructors ..., | ||
-bugprone-exception-escape, | ||
-bugprone-narrowing-conversions, | ||
-bugprone-chained-comparison,# RIP decomposers, | ||
modernize-*, | ||
-modernize-avoid-c-arrays, | ||
-modernize-use-auto, | ||
-modernize-use-emplace, | ||
-modernize-use-nullptr,# it went crazy with three-way comparison operators, | ||
-modernize-use-trailing-return-type, | ||
-modernize-return-braced-init-list, | ||
-modernize-concat-nested-namespaces, | ||
-modernize-use-nodiscard, | ||
-modernize-use-default-member-init, | ||
-modernize-type-traits,# we need to support C++14, | ||
-modernize-deprecated-headers, | ||
,# There's a lot of these and most of them are probably not useful, | ||
-modernize-pass-by-value, | ||
performance-*, | ||
-performance-enum-size, | ||
portability-*, | ||
readability-*, | ||
-readability-braces-around-statements, | ||
-readability-container-size-empty, | ||
-readability-convert-member-functions-to-static, | ||
-readability-else-after-return, | ||
-readability-function-cognitive-complexity, | ||
-readability-function-size, | ||
-readability-identifier-length, | ||
-readability-implicit-bool-conversion, | ||
-readability-isolate-declaration, | ||
-readability-magic-numbers, | ||
-readability-named-parameter, | ||
-readability-qualified-auto, | ||
-readability-redundant-access-specifiers, | ||
-readability-simplify-boolean-expr, | ||
-readability-static-definition-in-anonymous-namespace, | ||
-readability-uppercase-literal-suffix, | ||
-readability-use-anyofallof, | ||
-readability-avoid-return-with-void-value, | ||
,# time hogs, | ||
-bugprone-throw-keyword-missing, | ||
-modernize-replace-auto-ptr, | ||
-readability-identifier-naming, | ||
,# We cannot use this until clang-tidy supports custom unique_ptr, | ||
-bugprone-use-after-move, | ||
,# Doesn't recognize unevaluated context in CATCH_MOVE and CATCH_FORWARD, | ||
-bugprone-macro-repeated-side-effects, | ||
WarningsAsErrors: >- | ||
clang-analyzer-core.*, | ||
clang-analyzer-cplusplus.*, | ||
clang-analyzer-security.*, | ||
clang-analyzer-unix.*, | ||
performance-move-const-arg, | ||
performance-unnecessary-value-param, | ||
readability-duplicate-include, | ||
HeaderFilterRegex: '.*\.(c|cxx|cpp)$' | ||
FormatStyle: none | ||
CheckOptions: {} | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.2.0) | ||
project(test_package CXX) | ||
cmake_minimum_required(VERSION 3.15) | ||
project(PackageTest CXX) | ||
|
||
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") | ||
conan_basic_setup() | ||
find_package(Catch2 CONFIG REQUIRED) | ||
|
||
find_package(Catch2 REQUIRED CONFIG) | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
|
||
target_link_libraries(${PROJECT_NAME} Catch2::Catch2WithMain) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14) | ||
add_executable(test_package test_package.cpp) | ||
target_link_libraries(test_package Catch2::Catch2WithMain) | ||
target_compile_features(test_package PRIVATE cxx_std_14) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
from conans import ConanFile, CMake | ||
from conan import ConanFile | ||
from conan.tools.cmake import CMake, cmake_layout | ||
from conan.tools.build import can_run | ||
from conan.tools.files import save, load | ||
import os | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake_find_package_multi", "cmake" | ||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" | ||
test_type = "explicit" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def generate(self): | ||
save(self, os.path.join(self.build_folder, "package_folder"), | ||
self.dependencies[self.tested_reference_str].package_folder) | ||
save(self, os.path.join(self.build_folder, "license"), | ||
self.dependencies[self.tested_reference_str].license) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
assert os.path.isfile(os.path.join( | ||
self.deps_cpp_info["catch2"].rootpath, "licenses", "LICENSE.txt")) | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run("%s -s" % bin_path, run_environment=True) | ||
if can_run(self): | ||
cmd = os.path.join(self.cpp.build.bindir, "test_package") | ||
self.run(cmd, env="conanrun") | ||
|
||
package_folder = load(self, os.path.join(self.build_folder, "package_folder")) | ||
license = load(self, os.path.join(self.build_folder, "license")) | ||
assert os.path.isfile(os.path.join(package_folder, "licenses", "LICENSE.txt")) | ||
assert license == 'BSL-1.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: M1 Mac builds | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-14 | ||
strategy: | ||
matrix: | ||
cxx: | ||
- clang++ | ||
build_type: [Debug, Release] | ||
std: [14, 17] | ||
include: | ||
- build_type: Debug | ||
examples: ON | ||
extra_tests: ON | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Configure build | ||
working-directory: ${{runner.workspace}} | ||
env: | ||
CXX: ${{matrix.cxx}} | ||
CXXFLAGS: ${{matrix.cxxflags}} | ||
run: | | ||
cmake -Bbuild -H$GITHUB_WORKSPACE \ | ||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ | ||
-DCMAKE_CXX_STANDARD=${{matrix.std}} \ | ||
-DCMAKE_CXX_STANDARD_REQUIRED=ON \ | ||
-DCATCH_DEVELOPMENT_BUILD=ON \ | ||
-DCATCH_BUILD_EXAMPLES=${{matrix.examples}} \ | ||
-DCATCH_BUILD_EXTRA_TESTS=${{matrix.examples}} | ||
- name: Build tests + lib | ||
working-directory: ${{runner.workspace}}/build | ||
run: make -j `sysctl -n hw.ncpu` | ||
|
||
- name: Run tests | ||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
working-directory: ${{runner.workspace}}/build | ||
run: ctest -C ${{matrix.build_type}} -j `sysctl -n hw.ncpu` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Package Manager Builds | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
conan_builds: | ||
name: Conan ${{matrix.conan_version}} | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
conan_version: | ||
- '1.63' | ||
- '2.1' | ||
|
||
include: | ||
# Conan 1 has default profiles installed | ||
- conan_version: '1.63' | ||
profile_generate: 'false' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install conan | ||
run: pip install conan==${{matrix.conan_version}} | ||
|
||
- name: Setup conan profiles | ||
if: matrix.profile_generate != 'false' | ||
run: conan profile detect | ||
|
||
- name: Run conan package create | ||
run: conan create . -tf .conan/test_package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.