Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bazel tests #2

Draft
wants to merge 2 commits into
base: bazelboost-1.83.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build --incompatible_use_platforms_repo_for_constraints
build --incompatible_enable_cc_toolchain_resolution
build --incompatible_strict_action_env
build --enable_runfiles
build --registry=https://raw.githubusercontent.com/bazelboost/registry/main
build --registry=https://bcr.bazel.build
common --registry=https://raw.githubusercontent.com/bazelboost/registry/main
common --registry=https://bcr.bazel.build

try-import %workspace%/user.bazelrc
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/bazel-*
/external
/.cache
/compile_commands.json
bazel-*
external
.cache
compile_commands.json
user.bazelrc
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module(
name = "boost.uuid",
version = "1.83.0.bzl.1",
version = "1.83.0.bzl.2",
compatibility_level = 108300,
)

Expand Down
1 change: 1 addition & 0 deletions test/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import %workspace%/../.bazelrc
38 changes: 38 additions & 0 deletions test/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
load("@rules_cc//cc:defs.bzl", "cc_test")

_TESTS = {
"test_bench_random": [
"@boost.timer",
],
# "test_detail_random_provider": [],
# "test_entropy_error": [],
# "test_generators": [],
# "test_hash": [],
# "test_include1": [],
# "test_include2": [],
# "test_io": [],
# "test_md5": [],
# "test_msvc_simd_bug981648_foo": [],
# "test_msvc_simd_bug981648_main": [],
# "test_name_generator": [],
# "test_nil_generator": [],
# "test_random_generator": [],
# "test_serialization": [],
# "test_sha1": [],
# "test_string_generator": [],
# "test_tagging": [],
# "test_uuid": [],
# "test_uuid_class": [],
# "test_uuid_in_map": [],
# "test_uuid_no_simd": [],
# "test_wserialization": [],
}

[cc_test(
name = test,
srcs = ["{}.cpp".format(test)],
deps = _TESTS[test] + [
"@boost.uuid",
"@boost.test//:test_main",
],
) for test in _TESTS]
20 changes: 20 additions & 0 deletions test/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module(name = "boost.uuid.test")

bazel_dep(name = "rules_cc", version = "0.0.8")
bazel_dep(name = "boost.array", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.assert", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.config", version = "1.83.0.bzl.6")
bazel_dep(name = "boost.container_hash", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.core", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.lexical_cast", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.move", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.numeric_conversion", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.predef", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.random", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.serialization", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.test", version = "1.83.0.bzl.4")
bazel_dep(name = "boost.timer", version = "1.83.0.bzl.1")
bazel_dep(name = "boost.winapi", version = "1.83.0.bzl.1")

bazel_dep(name = "boost.uuid")
local_path_override(module_name = "boost.uuid", path = "..")
1 change: 1 addition & 0 deletions test/WORKSPACE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SEE: MODULE.bazel