diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/rocksdb/defs.bzl | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/rocksdb/defs.bzl')
-rw-r--r-- | src/rocksdb/defs.bzl | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/rocksdb/defs.bzl b/src/rocksdb/defs.bzl new file mode 100644 index 000000000..83e9a579f --- /dev/null +++ b/src/rocksdb/defs.bzl @@ -0,0 +1,42 @@ +# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. +# +# defs.bzl - Definitions for Facebook-specific buck build integration +# in TARGETS + +load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") +load("@fbcode_macros//build_defs:custom_unittest.bzl", "custom_unittest") + +def test_binary( + test_name, + test_cc, + parallelism, + rocksdb_arch_preprocessor_flags, + rocksdb_os_preprocessor_flags, + rocksdb_compiler_flags, + rocksdb_preprocessor_flags, + rocksdb_external_deps, + rocksdb_os_deps, + extra_deps, + extra_compiler_flags): + TEST_RUNNER = native.package_name() + "/buckifier/rocks_test_runner.sh" + + ttype = "gtest" if parallelism == "parallel" else "simple" + test_bin = test_name + "_bin" + + cpp_binary( + name = test_bin, + srcs = [test_cc], + arch_preprocessor_flags = rocksdb_arch_preprocessor_flags, + os_preprocessor_flags = rocksdb_os_preprocessor_flags, + compiler_flags = rocksdb_compiler_flags + extra_compiler_flags, + preprocessor_flags = rocksdb_preprocessor_flags, + deps = [":rocksdb_test_lib"] + extra_deps, + os_deps = rocksdb_os_deps, + external_deps = rocksdb_external_deps, + ) + + custom_unittest( + name = test_name, + command = [TEST_RUNNER, "$(location :{})".format(test_bin)], + type = ttype, + ) |