aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessio Balsini <balsini@google.com>2024-01-31 16:44:30 +0000
committerAlessio Balsini <balsini@google.com>2024-02-05 11:07:42 +0000
commit7b07e0cd8ca87b8221ee17220a0586f7a972c19d (patch)
treede2c8c286cab5ec2d8c5c1fe20dabe094854d905
parent4e34847ac3c301aa6186f03da2f8547cd9ecfe7d (diff)
downloaddittosuite-7b07e0cd8ca87b8221ee17220a0586f7a972c19d.tar.gz
Add tests to Bazel build
Create the test target that groups all the tests in the project. Test: bazel test dittobench_test Bug: 322744630 Change-Id: Ic6e0ffc7ca8fbe88e7e73c0a0446e0d397982e3b Signed-off-by: Alessio Balsini <balsini@google.com>
-rw-r--r--BUILD.bazel15
-rw-r--r--MODULE.bazel1
2 files changed, 16 insertions, 0 deletions
diff --git a/BUILD.bazel b/BUILD.bazel
index aa6bd62..016091a 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -56,3 +56,18 @@ cc_binary(
":libditto",
],
)
+
+cc_test(
+ name = "dittobench_test",
+ srcs = glob([
+ "test/*.cpp",
+ "test/include/*.h",
+ ]),
+ data = glob([
+ "example/*",
+ ]),
+ deps = [
+ "libditto",
+ "@googletest//:gtest_main",
+ ],
+)
diff --git a/MODULE.bazel b/MODULE.bazel
index 962e858..0bf69ab 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -5,3 +5,4 @@ module(
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "protobuf", version = "3.19.6")
+bazel_dep(name = "googletest", version = "1.14.0")