-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add bazel build rule for SelfTest (#2857)
This PR primarily accomplishes two tasks: 1) It adds MODULE.bazel.lock to the .gitignore file. 2) It includes a Bazel build rule for SelfTest, which can be utilized with the command bazel test //tests:catch2_self_test.
- Loading branch information
Showing
2 changed files
with
84 additions
and
0 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,83 @@ | ||
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
cc_library( | ||
name = "catch2_self_test_helper", | ||
srcs = ["SelfTest/helpers/parse_test_spec.cpp"], | ||
hdrs = [ | ||
"SelfTest/helpers/parse_test_spec.hpp", | ||
"SelfTest/helpers/range_test_helpers.hpp", | ||
"SelfTest/helpers/type_with_lit_0_comparisons.hpp", | ||
], | ||
includes = ["SelfTest"], | ||
deps = [ | ||
"//:catch2", | ||
], | ||
) | ||
|
||
cc_test( | ||
name = "catch2_self_test", | ||
size = "small", | ||
srcs = [ | ||
"SelfTest/IntrospectiveTests/Algorithms.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Clara.tests.cpp", | ||
"SelfTest/IntrospectiveTests/CmdLine.tests.cpp", | ||
"SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp", | ||
"SelfTest/IntrospectiveTests/ColourImpl.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Details.tests.cpp", | ||
"SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp", | ||
"SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Integer.tests.cpp", | ||
"SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Parse.tests.cpp", | ||
"SelfTest/IntrospectiveTests/PartTracker.tests.cpp", | ||
"SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Reporters.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Sharding.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Stream.tests.cpp", | ||
"SelfTest/IntrospectiveTests/String.tests.cpp", | ||
"SelfTest/IntrospectiveTests/StringManip.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Tag.tests.cpp", | ||
"SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp", | ||
"SelfTest/IntrospectiveTests/TestSpec.tests.cpp", | ||
"SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp", | ||
"SelfTest/IntrospectiveTests/TextFlow.tests.cpp", | ||
"SelfTest/IntrospectiveTests/ToString.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Traits.tests.cpp", | ||
"SelfTest/IntrospectiveTests/UniquePtr.tests.cpp", | ||
"SelfTest/IntrospectiveTests/Xml.tests.cpp", | ||
"SelfTest/TestRegistrations.cpp", | ||
"SelfTest/TimingTests/Sleep.tests.cpp", | ||
"SelfTest/UsageTests/Approx.tests.cpp", | ||
"SelfTest/UsageTests/BDD.tests.cpp", | ||
"SelfTest/UsageTests/Benchmark.tests.cpp", | ||
"SelfTest/UsageTests/Class.tests.cpp", | ||
"SelfTest/UsageTests/Compilation.tests.cpp", | ||
"SelfTest/UsageTests/Condition.tests.cpp", | ||
"SelfTest/UsageTests/Decomposition.tests.cpp", | ||
"SelfTest/UsageTests/EnumToString.tests.cpp", | ||
"SelfTest/UsageTests/Exception.tests.cpp", | ||
"SelfTest/UsageTests/Generators.tests.cpp", | ||
"SelfTest/UsageTests/Matchers.tests.cpp", | ||
"SelfTest/UsageTests/MatchersRanges.tests.cpp", | ||
"SelfTest/UsageTests/Message.tests.cpp", | ||
"SelfTest/UsageTests/Misc.tests.cpp", | ||
"SelfTest/UsageTests/ToStringByte.tests.cpp", | ||
"SelfTest/UsageTests/ToStringChrono.tests.cpp", | ||
"SelfTest/UsageTests/ToStringGeneral.tests.cpp", | ||
"SelfTest/UsageTests/ToStringOptional.tests.cpp", | ||
"SelfTest/UsageTests/ToStringPair.tests.cpp", | ||
"SelfTest/UsageTests/ToStringTuple.tests.cpp", | ||
"SelfTest/UsageTests/ToStringVariant.tests.cpp", | ||
"SelfTest/UsageTests/ToStringVector.tests.cpp", | ||
"SelfTest/UsageTests/ToStringWhich.tests.cpp", | ||
"SelfTest/UsageTests/Tricky.tests.cpp", | ||
"SelfTest/UsageTests/VariadicMacros.tests.cpp", | ||
], | ||
deps = [ | ||
":catch2_self_test_helper", | ||
"//:catch2", | ||
"//:catch2_main", | ||
], | ||
) |