Skip to content

Commit

Permalink
Buildifier
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Feb 15, 2024
1 parent 51001d9 commit 74b3a81
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 25 deletions.
6 changes: 6 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ load(
"gz_export_header",
"gz_include_header",
)
load(
"@gz//bazel/lint:lint.bzl",
"add_lint_tests",
)
load("@rules_license//rules:license.bzl", "license")

package(
Expand Down Expand Up @@ -132,3 +136,5 @@ test_sources = glob(["src/*_TEST.cc"])
"@gtest//:gtest_main",
],
) for src in test_sources]

add_lint_tests()
6 changes: 6 additions & 0 deletions bullet-featherstone/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ load(
"GZ_ROOT",
"GZ_VISIBILITY",
)
load(
"@gz//bazel/lint:lint.bzl",
"add_lint_tests",
)

private_headers = glob(["src/*.hh"])

Expand Down Expand Up @@ -42,3 +46,5 @@ cc_binary(
GZ_ROOT + "plugin:register",
],
)

add_lint_tests()
35 changes: 26 additions & 9 deletions dartsim/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ cc_test(
"GZ_BAZEL": "1",
"GZ_BAZEL_PATH": "physics",
},
includes = ["src", "include"],
includes = [
"include",
"src",
],
local_defines = [
"TEST_WORLD_DIR='\"physics/dartsim/worlds/\"'",
"GZ_PHYSICS_RESOURCE_DIR='\"physics/test/resources/\"'",
"dartsim_plugin_LIB='\"physics/dartsim/libgz-physics-dartsim-plugin.so\"'"
"dartsim_plugin_LIB='\"physics/dartsim/libgz-physics-dartsim-plugin.so\"'",
],
deps = [
GZ_ROOT + "common/geospatial",
Expand Down Expand Up @@ -101,7 +104,10 @@ cc_test(
"GZ_BAZEL": "1",
"GZ_BAZEL_PATH": "physics",
},
includes = ["src", "include"],
includes = [
"include",
"src",
],
deps = [
":dartsim",
GZ_ROOT + "physics/test:common_test",
Expand All @@ -124,11 +130,14 @@ cc_test(
"GZ_BAZEL": "1",
"GZ_BAZEL_PATH": "physics",
},
includes = ["src", "include"],
includes = [
"include",
"src",
],
local_defines = [
"TEST_WORLD_DIR='\"physics/dartsim/worlds/\"'",
"GZ_PHYSICS_RESOURCE_DIR='\"physics/test/resources/\"'",
"dartsim_plugin_LIB='\"physics/dartsim/libgz-physics-dartsim-plugin.so\"'"
"dartsim_plugin_LIB='\"physics/dartsim/libgz-physics-dartsim-plugin.so\"'",
],
deps = [
GZ_ROOT + "common/geospatial",
Expand All @@ -143,9 +152,14 @@ cc_test(
"@gtest//:gtest_main",
],
)

test_sources = glob(
include = ["src/*_TEST.cc"],
exclude = ["src/AddedMassFeatures_TEST.cc", "src/Base_TEST.cc", "src/SDFFeatures_TEST.cc"]
include = ["src/*_TEST.cc"],
exclude = [
"src/AddedMassFeatures_TEST.cc",
"src/Base_TEST.cc",
"src/SDFFeatures_TEST.cc",
],
)

[cc_test(
Expand All @@ -161,11 +175,14 @@ test_sources = glob(
"GZ_BAZEL": "1",
"GZ_BAZEL_PATH": "physics",
},
includes = ["src", "include"],
includes = [
"include",
"src",
],
local_defines = [
"TEST_WORLD_DIR='\"physics/dartsim/worlds/\"'",
"GZ_PHYSICS_RESOURCE_DIR='\"physics/test/resources/\"'",
"dartsim_plugin_LIB='\"physics/dartsim/libgz-physics-dartsim-plugin.so\"'"
"dartsim_plugin_LIB='\"physics/dartsim/libgz-physics-dartsim-plugin.so\"'",
],
deps = [
GZ_ROOT + "common/geospatial",
Expand Down
32 changes: 16 additions & 16 deletions test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ cc_library(
)

cc_library(
name = "common_test",
hdrs = ["common_test/Worlds.hh"],
includes = ["common_test"],
visibility = GZ_VISIBILITY,
include_prefix = "test",
data = [
":resources",
"common_test/worlds",
],
deps = [
":test_headers",
]
name = "common_test",
hdrs = ["common_test/Worlds.hh"],
data = [
"common_test/worlds",
":resources",
],
include_prefix = "test",
includes = ["common_test"],
visibility = GZ_VISIBILITY,
deps = [
":test_headers",
],
)

cc_library(
Expand All @@ -37,8 +37,8 @@ cc_library(
GZ_ROOT + "physics/dartsim:libgz-physics-dartsim-plugin.so",
],
deps = [
":common_test"
]
":common_test",
],
)

cc_library(
Expand All @@ -47,8 +47,8 @@ cc_library(
GZ_ROOT + "physics/bullet-featherstone:libgz-physics-bullet-featherstone-plugin.so",
],
deps = [
":common_test"
]
":common_test",
],
)

physics_engines = [
Expand Down

0 comments on commit 74b3a81

Please sign in to comment.