Skip to content

Commit

Permalink
Merge branch 'catchorg:devel' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonThomasJonesARM committed Jun 17, 2022
2 parents 63b859b + 078201f commit eed01db
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Expand Up @@ -39,7 +39,9 @@ endif()
project(Catch2
VERSION 3.0.1 # CML version placeholder, don't delete
LANGUAGES CXX
HOMEPAGE_URL "https://github.com/catchorg/Catch2"
# HOMEPAGE_URL is not supported until CMake version 3.12, which
# we do not target yet.
# HOMEPAGE_URL "https://github.com/catchorg/Catch2"
DESCRIPTION "A modern, C++-native, unit test framework."
)

Expand Down
1 change: 1 addition & 0 deletions conanfile.py
Expand Up @@ -51,6 +51,7 @@ def package_info(self):
self.cpp_info.components["catch2base"].names["cmake_find_package_multi"] = "Catch2"
self.cpp_info.components["catch2base"].names["pkg_config"] = "Catch2"
self.cpp_info.components["catch2base"].libs = ["Catch2" + lib_suffix]
self.cpp_info.components["catch2base"].builddirs.append("lib/cmake/Catch2")
# Catch2WithMain
self.cpp_info.components["catch2main"].names["cmake_find_package"] = "Catch2WithMain"
self.cpp_info.components["catch2main"].names["cmake_find_package_multi"] = "Catch2WithMain"
Expand Down
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Expand Up @@ -311,6 +311,7 @@ add_test(
$<TARGET_FILE:SelfTest> "#2025: same-level sections"
-c "A"
-c "B"
--colour-mode none
)
set_tests_properties(FilteredSection::GeneratorsDontCauseInfiniteLoop-2
PROPERTIES
Expand Down Expand Up @@ -394,6 +395,7 @@ add_test(NAME "Benchmarking::SkipBenchmarkMacros"
$<TARGET_FILE:SelfTest> "Skip benchmark macros"
--reporter console
--skip-benchmarks
--colour-mode none
)
set_tests_properties("Benchmarking::SkipBenchmarkMacros"
PROPERTIES
Expand Down Expand Up @@ -501,6 +503,7 @@ add_test(NAME "Outputs::DashAsOutLocationSendsOutputToStdout"
COMMAND
$<TARGET_FILE:SelfTest> "Factorials are computed"
--out=-
--colour-mode none
)
set_tests_properties("Outputs::DashAsOutLocationSendsOutputToStdout"
PROPERTIES
Expand All @@ -511,6 +514,7 @@ add_test(NAME "Reporters::DashAsLocationInReporterSpecSendsOutputToStdout"
COMMAND
$<TARGET_FILE:SelfTest> "Factorials are computed"
--reporter console::out=-
--colour-mode none
)
set_tests_properties("Reporters::DashAsLocationInReporterSpecSendsOutputToStdout"
PROPERTIES
Expand Down
10 changes: 6 additions & 4 deletions tools/scripts/approvalTests.py
Expand Up @@ -200,23 +200,25 @@ def approve(baseName, args):
print(" " + cmdPath)


base_args = ["--order", "lex", "--rng-seed", "1", "--colour-mode", "none"]

## special cases first:
# Standard console reporter
approve("console.std", ["~[!nonportable]~[!benchmark]~[approvals] *", "--order", "lex", "--rng-seed", "1"])
approve("console.std", ["~[!nonportable]~[!benchmark]~[approvals] *"] + base_args)
# console reporter, include passes, warn about No Assertions, limit failures to first 4
approve("console.swa4", ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "-x", "4", "--order", "lex", "--rng-seed", "1"])
approve("console.swa4", ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "-x", "4"] + base_args)

## Common reporter checks: include passes, warn about No Assertions
reporters = ('console', 'junit', 'xml', 'compact', 'sonarqube', 'tap', 'teamcity', 'automake')
for reporter in reporters:
filename = '{}.sw'.format(reporter)
common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "--order", "lex", "--rng-seed", "1"]
common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions"] + base_args
reporter_args = ['-r', reporter]
approve(filename, common_args + reporter_args)

## All reporters at the same time

common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "--order", "lex", "--rng-seed", "1"]
common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions"] + base_args
filenames = ['{}.sw.multi'.format(reporter) for reporter in reporters]
reporter_args = []
for reporter, filename in zip(reporters, filenames):
Expand Down

0 comments on commit eed01db

Please sign in to comment.