From 02e5aafaccba3f1c891995a09218b95e48c73b4e Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Thu, 11 Jun 2020 16:13:42 -0700 Subject: [PATCH 1/5] Add init attempt at bazel build Signed-off-by: John Shepherd --- BUILD.bazel | 229 ++++++++++++++++++++++++++++++++++++++++++++ dartsim/BUILD.bazel | 115 ++++++++++++++++++++++ mesh/BUILD.bazel | 23 +++++ sdf/BUILD.bazel | 27 ++++++ test/BUILD.bazel | 63 ++++++++++++ 5 files changed, 457 insertions(+) create mode 100644 BUILD.bazel create mode 100644 dartsim/BUILD.bazel create mode 100644 mesh/BUILD.bazel create mode 100644 sdf/BUILD.bazel create mode 100644 test/BUILD.bazel diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 000000000..c41d96d83 --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,229 @@ +load( + "//ign_bazel:cmake_configure_file.bzl", + "cmake_configure_file", +) +load( + "//ign_bazel:generate_include_header.bzl", + "generate_include_header", +) +load( + "//ign_bazel:generate_file.bzl", + "generate_file", +) + +package(default_visibility = ["//visibility:public"]) + +RESOURCE_PATH = "~/.ignition" +PROJECT_NAME = "ignition-physics" +PROJECT_MAJOR = 2 +PROJECT_MINOR = 1 +PROJECT_PATCH = 0 +IGN_DESIGNATION_UPPER = "TEST" +PHYSICS_ENGINE_INSTALL_DIR = "/tmp" + +# Generates config.hh based on the version numbers in CMake code. +cmake_configure_file( + name = "config", + src = "include/ignition/physics/config.hh.in", + out = "include/ignition/physics/config.hh", + cmakelists = ["CMakeLists.txt"], + defines = [ + "PROJECT_VERSION_MAJOR=%d" % (PROJECT_MAJOR), + "PROJECT_VERSION_MINOR=%d" % (PROJECT_MINOR), + "PROJECT_VERSION_PATCH=%d" % (PROJECT_PATCH), + "PROJECT_MAJOR_VERSION=%d" % (PROJECT_MAJOR), + "PROJECT_MINOR_VERSION=%d" % (PROJECT_MINOR), + "PROJECT_PATCH_VERSION=%d" % (PROJECT_PATCH), + "PROJECT_VERSION=%d.%d" % (PROJECT_MAJOR, PROJECT_MINOR), + "PROJECT_VERSION_FULL=%d.%d.%d" % (PROJECT_MAJOR, PROJECT_MINOR, PROJECT_PATCH), # noqa + "PROJECT_NAME_NO_VERSION=%s" % (PROJECT_NAME), + "PROJECT_NAME=%s" % (PROJECT_NAME), + "IGN_PROJECT_NAME=%s" % (PROJECT_NAME), + "IGN_RENDERING_RESOURCE_PATH=%s" % (RESOURCE_PATH), + "IGN_DESIGNATION_UPPER=%s" % (IGN_DESIGNATION_UPPER), + "IGNITION_PHYSICS_ENGINE_INSTALL_DIR=%s" % (PHYSICS_ENGINE_INSTALL_DIR), + ], + visibility = ["//visibility:private"], +) + +generate_file( + name = "include/ignition/physics/Export.hh", + content = """ +#pragma once +// IGN_DEPRECATED is defined by all ignition libraries, but the version below +// is a simplified version. When mixing the regular ignition libraries and +// the drake compiled ignition libraries, the compiler throws a warning about +// the macro being multiply defined. We undefine it before redefining it here +// to work around that issue. Note that the IGNITION_PHYSICS_VISIBLE macro +// shouldn't be defined multiple times, but we undefine it just in case. +#ifdef IGNITION_PHYSICS_VISIBLE +#undef IGNITION_PHYSICS_VISIBLE +#endif +#define IGNITION_PHYSICS_VISIBLE __attribute__ ((visibility("default"))) +#ifdef IGN_DEPRECATED +#undef IGN_DEPRECATED +#endif +#define IGN_DEPRECATED(version) __attribute__ ((__deprecated__)) + """, + visibility = ["//visibility:private"], +) + +public_headers_no_gen = [ + "include/ignition/physics/BoxShape.hh", + "include/ignition/physics/CanReadData.hh", + "include/ignition/physics/CanWriteData.hh", + "include/ignition/physics/Cloneable.hh", + "include/ignition/physics/CompositeData.hh", + "include/ignition/physics/ConstructEmpty.hh", + "include/ignition/physics/CylinderShape.hh", + "include/ignition/physics/DataStatusMask.hh", + "include/ignition/physics/DeclareJointType.hh", + "include/ignition/physics/DeclareShapeType.hh", + "include/ignition/physics/Entity.hh", + "include/ignition/physics/Feature.hh", + "include/ignition/physics/FeatureList.hh", + "include/ignition/physics/FeaturePolicy.hh", + "include/ignition/physics/FindFeatures.hh", + "include/ignition/physics/FixedJoint.hh", + "include/ignition/physics/ForwardStep.hh", + "include/ignition/physics/FrameData.hh", + "include/ignition/physics/FrameID.hh", + "include/ignition/physics/FrameSemantics.hh", + "include/ignition/physics/FreeGroup.hh", + "include/ignition/physics/FreeJoint.hh", + "include/ignition/physics/Geometry.hh", + "include/ignition/physics/GetBoundingBox.hh", + "include/ignition/physics/GetContacts.hh", + "include/ignition/physics/GetEntities.hh", + "include/ignition/physics/Implements.hh", + "include/ignition/physics/Joint.hh", + "include/ignition/physics/Link.hh", + "include/ignition/physics/OperateOnSpecifiedData.hh", + "include/ignition/physics/PlaneShape.hh", + "include/ignition/physics/PrismaticJoint.hh", + "include/ignition/physics/Register.hh", + "include/ignition/physics/RegisterMore.hh", + "include/ignition/physics/RelativeQuantity.hh", + "include/ignition/physics/RemoveEntities.hh", + "include/ignition/physics/RequestEngine.hh", + "include/ignition/physics/RequestFeatures.hh", + "include/ignition/physics/RevoluteJoint.hh", + "include/ignition/physics/Shape.hh", + "include/ignition/physics/SpecifyData.hh", + "include/ignition/physics/SphereShape.hh", + "include/ignition/physics/TemplateHelpers.hh", + "include/ignition/physics/detail/BoxShape.hh", + "include/ignition/physics/detail/CanReadData.hh", + "include/ignition/physics/detail/CanWriteData.hh", + "include/ignition/physics/detail/Cloneable.hh", + "include/ignition/physics/detail/CompositeData.hh", + "include/ignition/physics/detail/ConstructEmpty.hh", + "include/ignition/physics/detail/CylinderShape.hh", + "include/ignition/physics/detail/DeclareDerivedType.hh", + "include/ignition/physics/detail/Entity.hh", + "include/ignition/physics/detail/FeatureList.hh", + "include/ignition/physics/detail/FindFeatures.hh", + "include/ignition/physics/detail/FixedJoint.hh", + "include/ignition/physics/detail/FrameData.hh", + "include/ignition/physics/detail/FrameSemantics.hh", + "include/ignition/physics/detail/FreeGroup.hh", + "include/ignition/physics/detail/FreeJoint.hh", + "include/ignition/physics/detail/GetBoundingBox.hh", + "include/ignition/physics/detail/GetContacts.hh", + "include/ignition/physics/detail/GetEntities.hh", + "include/ignition/physics/detail/Identity.hh", + "include/ignition/physics/detail/InspectFeatures.hh", + "include/ignition/physics/detail/Joint.hh", + "include/ignition/physics/detail/Link.hh", + "include/ignition/physics/detail/OperateOnSpecifiedData.hh", + "include/ignition/physics/detail/PlaneShape.hh", + "include/ignition/physics/detail/PrismaticJoint.hh", + "include/ignition/physics/detail/PrivateSpecifyData.hh", + "include/ignition/physics/detail/Register.hh", + "include/ignition/physics/detail/RelativeQuantity.hh", + "include/ignition/physics/detail/RemoveEntities.hh", + "include/ignition/physics/detail/RequestEngine.hh", + "include/ignition/physics/detail/RequestFeatures.hh", + "include/ignition/physics/detail/RevoluteJoint.hh", + "include/ignition/physics/detail/Shape.hh", + "include/ignition/physics/detail/SpecifyData.hh", + "include/ignition/physics/detail/SphereShape.hh", +] + +test_sources = [ + "src/Cloneable_TEST.cc", + "src/CompositeData_TEST.cc", + "src/FeatureList_TEST.cc", + "src/Feature_TEST.cc", + "src/FindFeatures_TEST.cc", + "src/SpecifyData_TEST.cc", +] + +sources = [ + "src/CanReadData.cc", + "src/CanWriteData.cc", + "src/CompositeData.cc", + "src/DataStatusMask.cc", + "src/FrameID.cc", + "src/Identity.cc", +] + +generate_include_header( + name = "physicshh_genrule", + out = "include/ignition/physics.hh", + hdrs = public_headers_no_gen + [ + "include/ignition/physics/config.hh", + "include/ignition/physics/Export.hh", + ], +) + +public_headers = public_headers_no_gen + [ + "include/ignition/physics/config.hh", + "include/ignition/physics/Export.hh", + "include/ignition/physics.hh", + "src/utils/TestDataTypes.hh", + "src/TestUtilities.hh", +] + +cc_binary( + name = "libign_physics.so", + srcs = sources + public_headers, + includes = ["include", "src"], + linkopts = ["-Wl,-soname,libign_physics.so"], + linkshared = True, + visibility = [], + deps = [ + "//ign_common:ign_common", + "//ign_common/graphics:graphics", + "//ign_common/events:events", + "//ign_plugin/loader:loader", + "//ign_plugin/core:ign_plugin", + "//ign_math:ign_math", + "//ign_bazel:utilities", + ], + # local_defines = ["IGN_RENDERING_PLUGIN_PATH='\"TODO: insert the correct string\"'"], +) + +cc_library( + name = "ign_physics", + srcs = ["libign_physics.so"], + hdrs = public_headers, + includes = ["include", "src"], + visibility = ["//visibility:public"], +) + +''' +[cc_test( + name = src.replace("/", "_").replace(".cc", "").replace("src_", ""), + srcs = [src], + deps = [ + "//ign_physics", + "//ign_math", + "//ign_bazel:utilities", + "//ign_plugin/core:ign_plugin", + "//ign_plugin/loader:loader", + "@gtest//:gtest", + "@gtest//:gtest_main", + ] +) for src in test_sources] +''' diff --git a/dartsim/BUILD.bazel b/dartsim/BUILD.bazel new file mode 100644 index 000000000..9af850838 --- /dev/null +++ b/dartsim/BUILD.bazel @@ -0,0 +1,115 @@ +load( + "//ign_bazel:cmake_configure_file.bzl", + "cmake_configure_file", +) +load( + "//ign_bazel:generate_include_header.bzl", + "generate_include_header", +) +load( + "//ign_bazel:generate_file.bzl", + "generate_file", +) + +test_sources = [ + "src/Base_TEST.cc", + #"src/Collisions_TEST.cc", + "src/EntityManagement_TEST.cc", + "src/JointFeatures_TEST.cc", + "src/LinkFeatures_TEST.cc", + "src/SDFFeatures_TEST.cc", + # "src/SimulationFeatures_TEST.cc", +] + +sources = [ + "src/CustomFeatures.cc", + "src/CustomMeshShape.cc", + "src/EntityManagementFeatures.cc", + "src/FreeGroupFeatures.cc", + "src/JointFeatures.cc", + "src/KinematicsFeatures.cc", + "src/LinkFeatures.cc", + "src/plugin.cc", + "src/SDFFeatures.cc", + "src/ShapeFeatures.cc", + "src/SimulationFeatures.cc", +] + +public_headers = [ + "src/Base.hh", + "src/CustomFeatures.hh", + "src/CustomMeshShape.hh", + "src/EntityManagementFeatures.hh", + "src/FreeGroupFeatures.hh", + "src/JointFeatures.hh", + "src/KinematicsFeatures.hh", + "src/LinkFeatures.hh", + "src/SDFFeatures.hh", + "src/ShapeFeatures.hh", + "src/SimulationFeatures.hh", + "include/ignition/physics/dartsim/World.hh", +] + +cc_binary( + name = "libign_physics-dartsim.so", + srcs = sources + public_headers, + includes = ["include", "src"], + linkopts = ["-Wl,-soname,libign_physics-dartsim.so"], + linkshared = True, + visibility = [], + copts = [ + "-Iexternal/eigen3", + ], + deps = [ + "//ign_bazel:utilities", + "//ign_plugin/core:ign_plugin", + "//ign_plugin/register:register", + "//ign_physics", + "//ign_physics/sdf:sdf", + "//ign_physics/mesh:mesh", + "//ign_common", + "//ign_common/graphics:graphics", + "//ign_common/profiler:profiler", + "//ign_math", + "//ign_math/eigen3:ign_math_eigen3", + "//sdformat", + "@eigen3//:headers", + "//dart:dart", + ], +) + +cc_library( + name = "dartsim", + srcs = ["libign_physics-dartsim.so"], + hdrs = public_headers, + includes = ["include", "src"], + visibility = ["//visibility:public"], +) + +[cc_test( + name = src.replace("/", "_").replace(".cc", "").replace("src_", ""), + srcs = [src], + copts = [ + "-Iexternal/eigen3", + ], + deps = [ + "//ign_bazel:utilities", + "//ign_math", + "//ign_physics", + "//ign_physics/dartsim:dartsim", + "//ign_physics/sdf:sdf", + "//ign_physics/test:test_utils", + "//ign_physics/mesh:mesh", + "//ign_common/graphics:graphics", + "//sdformat", + "//dart:dart", + "@gtest//:gtest", + "@gtest//:gtest_main", + "@eigen3//:headers", + ], + local_defines = [ + "TEST_WORLD_DIR='\"TODO: insert the correct string\"'", + "IGNITION_PHYSICS_RESOURCE_DIR='\"TODO: insert the correct string\"'", + "dartsim_plugin_LIB='\"TODO: insert the correct string\"'", + ], +) for src in test_sources] diff --git a/mesh/BUILD.bazel b/mesh/BUILD.bazel new file mode 100644 index 000000000..8f899a9e2 --- /dev/null +++ b/mesh/BUILD.bazel @@ -0,0 +1,23 @@ +public_headers = [ + "include/ignition/physics/mesh/MeshShape.hh", + "include/ignition/physics/mesh/detail/MeshShape.hh", +] + +cc_binary( + name = "libign_physics-mesh.so", + srcs = public_headers, + includes = ["include"], + linkopts = ["-Wl,-soname,libign_physics-mesh.so"], + linkshared = True, + visibility = [], + deps = [ + ], +) + +cc_library( + name = "mesh", + srcs = ["libign_physics-mesh.so"], + hdrs = public_headers, + includes = ["include"], + visibility = ["//visibility:public"], +) diff --git a/sdf/BUILD.bazel b/sdf/BUILD.bazel new file mode 100644 index 000000000..ed7861f70 --- /dev/null +++ b/sdf/BUILD.bazel @@ -0,0 +1,27 @@ +public_headers = [ + "include/ignition/physics/sdf/ConstructCollision.hh", + "include/ignition/physics/sdf/ConstructJoint.hh", + "include/ignition/physics/sdf/ConstructLink.hh", + "include/ignition/physics/sdf/ConstructModel.hh", + "include/ignition/physics/sdf/ConstructVisual.hh", + "include/ignition/physics/sdf/ConstructWorld.hh", +] + +cc_binary( + name = "libign_physics-sdf.so", + srcs = public_headers, + includes = ["include"], + linkopts = ["-Wl,-soname,libign_physics-sdf.so"], + linkshared = True, + visibility = [], + deps = [ + ], +) + +cc_library( + name = "sdf", + srcs = ["libign_physics-sdf.so"], + hdrs = public_headers, + includes = ["include"], + visibility = ["//visibility:public"], +) diff --git a/test/BUILD.bazel b/test/BUILD.bazel new file mode 100644 index 000000000..e6668ef1c --- /dev/null +++ b/test/BUILD.bazel @@ -0,0 +1,63 @@ +sources = [ + # "integration/CanReadWrite.cc", + # "integration/DoublePendulum.cc", + # "integration/FeatureSystem.cc", + # "integration/FrameSemantics2d.cc", + # "integration/FrameSemantics2f.cc", + # "integration/FrameSemantics3d.cc", + # "integration/FrameSemantics3f.cc", + # "integration/JointTypes2d.cc", + # "integration/JointTypes2f.cc", + # "integration/JointTypes3d.cc", + # "integration/JointTypes3f.cc", + # "integration/RequestFeatures.cc", + # "performance/ExpectData.cc", + # "performance/symbol_names.cc", + # "plugins/DARTDoublePendulum.cc", + # "plugins/frames.cc", + # "plugins/MockEntities.cc", + # "plugins/MockJoints.cc", + # "static_assert/FeatureList_conflict.cc", + # "static_assert/FeatureList_InvalidFeature.cc", + # "static_assert/FeatureList_nested_conflict.cc", +] + +public_headers = [ + "integration/FrameSemantics.hh", + "integration/JointTypes.hh", + "MockCenterOfMass.hh", + "MockCreateEntities.hh", + "MockDoublePendulum.hh", + "MockFeatures.hh", + "MockFrameSemantics.hh", + "MockGetByName.hh", + "MockJoints.hh", + "MockSetName.hh", + "PhysicsPluginsList.hh", + "Utils.hh", +] + +cc_library( + name = "test_utils", + hdrs = public_headers, + includes = ["."], + visibility = ["//visibility:public"], + copts = [ + "-Iexternal/eigen3", + ], + deps = [ + "//ign_common", + "//ign_physics", + "//ign_math", + "//ign_math/eigen3:ign_math_eigen3", + "//ign_plugin/core:ign_plugin", + "//ign_plugin/register:register", + "//ign_plugin/loader:loader", + "//ign_bazel:utilities", + "@eigen3//:headers", + ], + include_prefix = "test", + local_defines = [ + "IGNITION_PHYSICS_RESOURCE_DIR='\"TODO: insert the correct string\"'", + ], +) From 369c5f687ba65c6228d7cd6fabfd2300898846b9 Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Thu, 11 Jun 2020 16:26:59 -0700 Subject: [PATCH 2/5] test updates Signed-off-by: John Shepherd --- BUILD.bazel | 5 +++-- dartsim/BUILD.bazel | 4 ++-- test/BUILD.bazel | 24 ------------------------ 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index c41d96d83..c12b2bc3c 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -200,6 +200,7 @@ cc_binary( "//ign_plugin/core:ign_plugin", "//ign_math:ign_math", "//ign_bazel:utilities", + "//dart:dart", ], # local_defines = ["IGN_RENDERING_PLUGIN_PATH='\"TODO: insert the correct string\"'"], ) @@ -212,18 +213,18 @@ cc_library( visibility = ["//visibility:public"], ) -''' [cc_test( name = src.replace("/", "_").replace(".cc", "").replace("src_", ""), srcs = [src], deps = [ "//ign_physics", + "//ign_physics/test:test_utils", "//ign_math", "//ign_bazel:utilities", "//ign_plugin/core:ign_plugin", "//ign_plugin/loader:loader", + "//dart:dart", "@gtest//:gtest", "@gtest//:gtest_main", ] ) for src in test_sources] -''' diff --git a/dartsim/BUILD.bazel b/dartsim/BUILD.bazel index 9af850838..d8c5f473f 100644 --- a/dartsim/BUILD.bazel +++ b/dartsim/BUILD.bazel @@ -13,12 +13,12 @@ load( test_sources = [ "src/Base_TEST.cc", - #"src/Collisions_TEST.cc", + # "src/Collisions_TEST.cc", "src/EntityManagement_TEST.cc", "src/JointFeatures_TEST.cc", "src/LinkFeatures_TEST.cc", "src/SDFFeatures_TEST.cc", - # "src/SimulationFeatures_TEST.cc", + # "src/SimulationFeatures_TEST.cc", ] sources = [ diff --git a/test/BUILD.bazel b/test/BUILD.bazel index e6668ef1c..e36de90de 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -1,27 +1,3 @@ -sources = [ - # "integration/CanReadWrite.cc", - # "integration/DoublePendulum.cc", - # "integration/FeatureSystem.cc", - # "integration/FrameSemantics2d.cc", - # "integration/FrameSemantics2f.cc", - # "integration/FrameSemantics3d.cc", - # "integration/FrameSemantics3f.cc", - # "integration/JointTypes2d.cc", - # "integration/JointTypes2f.cc", - # "integration/JointTypes3d.cc", - # "integration/JointTypes3f.cc", - # "integration/RequestFeatures.cc", - # "performance/ExpectData.cc", - # "performance/symbol_names.cc", - # "plugins/DARTDoublePendulum.cc", - # "plugins/frames.cc", - # "plugins/MockEntities.cc", - # "plugins/MockJoints.cc", - # "static_assert/FeatureList_conflict.cc", - # "static_assert/FeatureList_InvalidFeature.cc", - # "static_assert/FeatureList_nested_conflict.cc", -] - public_headers = [ "integration/FrameSemantics.hh", "integration/JointTypes.hh", From 27e787a8dd6c6e8228a9fdd8cd4bebb9bb1fd04b Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Mon, 15 Jun 2020 13:32:14 -0700 Subject: [PATCH 3/5] Add gl linking flags Signed-off-by: John Shepherd --- BUILD.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.bazel b/BUILD.bazel index c12b2bc3c..dc2831846 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -189,7 +189,7 @@ cc_binary( name = "libign_physics.so", srcs = sources + public_headers, includes = ["include", "src"], - linkopts = ["-Wl,-soname,libign_physics.so"], + linkopts = ["-Wl,-soname,libign_physics.so", "-lglut", "-lGL", "-lGLU"], linkshared = True, visibility = [], deps = [ From fa3b653c0cc29daf7f1e1a2f7acda522e48cc07f Mon Sep 17 00:00:00 2001 From: John Shepherd Date: Thu, 18 Jun 2020 16:06:48 -0700 Subject: [PATCH 4/5] Add eigen and dart updates Signed-off-by: John Shepherd --- BUILD.bazel | 4 ++-- dartsim/BUILD.bazel | 14 ++++---------- test/BUILD.bazel | 5 +---- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index dc2831846..1aad33614 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -200,7 +200,7 @@ cc_binary( "//ign_plugin/core:ign_plugin", "//ign_math:ign_math", "//ign_bazel:utilities", - "//dart:dart", + "@dart", ], # local_defines = ["IGN_RENDERING_PLUGIN_PATH='\"TODO: insert the correct string\"'"], ) @@ -223,7 +223,7 @@ cc_library( "//ign_bazel:utilities", "//ign_plugin/core:ign_plugin", "//ign_plugin/loader:loader", - "//dart:dart", + "@dart", "@gtest//:gtest", "@gtest//:gtest_main", ] diff --git a/dartsim/BUILD.bazel b/dartsim/BUILD.bazel index d8c5f473f..1b5f0569c 100644 --- a/dartsim/BUILD.bazel +++ b/dartsim/BUILD.bazel @@ -57,9 +57,6 @@ cc_binary( linkopts = ["-Wl,-soname,libign_physics-dartsim.so"], linkshared = True, visibility = [], - copts = [ - "-Iexternal/eigen3", - ], deps = [ "//ign_bazel:utilities", "//ign_plugin/core:ign_plugin", @@ -73,8 +70,8 @@ cc_binary( "//ign_math", "//ign_math/eigen3:ign_math_eigen3", "//sdformat", - "@eigen3//:headers", - "//dart:dart", + "@eigen3", + "@dart", ], ) @@ -89,9 +86,6 @@ cc_library( [cc_test( name = src.replace("/", "_").replace(".cc", "").replace("src_", ""), srcs = [src], - copts = [ - "-Iexternal/eigen3", - ], deps = [ "//ign_bazel:utilities", "//ign_math", @@ -102,10 +96,10 @@ cc_library( "//ign_physics/mesh:mesh", "//ign_common/graphics:graphics", "//sdformat", - "//dart:dart", + "@dart", "@gtest//:gtest", "@gtest//:gtest_main", - "@eigen3//:headers", + "@eigen3", ], local_defines = [ "TEST_WORLD_DIR='\"TODO: insert the correct string\"'", diff --git a/test/BUILD.bazel b/test/BUILD.bazel index e36de90de..4ce682a93 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -18,9 +18,6 @@ cc_library( hdrs = public_headers, includes = ["."], visibility = ["//visibility:public"], - copts = [ - "-Iexternal/eigen3", - ], deps = [ "//ign_common", "//ign_physics", @@ -30,7 +27,7 @@ cc_library( "//ign_plugin/register:register", "//ign_plugin/loader:loader", "//ign_bazel:utilities", - "@eigen3//:headers", + "@eigen3", ], include_prefix = "test", local_defines = [ From 12d3209d00362ca128729a9361fc926850fdeb65 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 26 Jun 2020 08:38:43 -0700 Subject: [PATCH 5/5] Fix all of ignition physics tests (#71) Signed-off-by: Michael Carroll Co-authored-by: Michael Carroll --- BUILD.bazel | 30 ++--- dartsim/BUILD.bazel | 50 ++++---- dartsim/src/Collisions_TEST.cc | 8 +- dartsim/src/EntityManagement_TEST.cc | 6 +- dartsim/src/JointFeatures_TEST.cc | 2 +- dartsim/src/LinkFeatures_TEST.cc | 2 +- dartsim/src/SDFFeatures_TEST.cc | 2 +- dartsim/src/SimulationFeatures_TEST.cc | 6 +- mesh/BUILD.bazel | 13 +- sdf/BUILD.bazel | 13 +- test/BUILD.bazel | 8 +- test/PhysicsPluginsList.hh | 40 +++++- test/Utils.hh | 2 + tpe/BUILD.bazel | 145 ++++++++++++++++++++++ tpe/plugin/src/EntityManagement_TEST.cc | 8 +- tpe/plugin/src/SDFFeatures_TEST.cc | 2 +- tpe/plugin/src/SimulationFeatures_TEST.cc | 8 +- 17 files changed, 259 insertions(+), 86 deletions(-) create mode 100644 tpe/BUILD.bazel diff --git a/BUILD.bazel b/BUILD.bazel index 1aad33614..54221ec94 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -186,30 +186,31 @@ public_headers = public_headers_no_gen + [ ] cc_binary( - name = "libign_physics.so", + name = "libignition-physics2.so", srcs = sources + public_headers, includes = ["include", "src"], - linkopts = ["-Wl,-soname,libign_physics.so", "-lglut", "-lGL", "-lGLU"], + linkopts = ["-Wl,-soname,libignition-physics2.so"], linkshared = True, visibility = [], deps = [ - "//ign_common:ign_common", - "//ign_common/graphics:graphics", - "//ign_common/events:events", - "//ign_plugin/loader:loader", + "//ign_common", + "//ign_common/graphics", + "//ign_common/events", + "//ign_plugin/loader", "//ign_plugin/core:ign_plugin", - "//ign_math:ign_math", + "//ign_math", "//ign_bazel:utilities", - "@dart", ], - # local_defines = ["IGN_RENDERING_PLUGIN_PATH='\"TODO: insert the correct string\"'"], ) cc_library( name = "ign_physics", - srcs = ["libign_physics.so"], + srcs = ["libignition-physics2.so"], hdrs = public_headers, - includes = ["include", "src"], + includes = ["include"], + deps = [ + "//ign_plugin/loader", + ], visibility = ["//visibility:public"], ) @@ -217,14 +218,15 @@ cc_library( name = src.replace("/", "_").replace(".cc", "").replace("src_", ""), srcs = [src], deps = [ - "//ign_physics", + ":ign_physics", "//ign_physics/test:test_utils", "//ign_math", "//ign_bazel:utilities", "//ign_plugin/core:ign_plugin", - "//ign_plugin/loader:loader", - "@dart", + "//ign_plugin/loader", "@gtest//:gtest", "@gtest//:gtest_main", ] ) for src in test_sources] + +exports_files(["resources"]) diff --git a/dartsim/BUILD.bazel b/dartsim/BUILD.bazel index 1b5f0569c..5b565dba9 100644 --- a/dartsim/BUILD.bazel +++ b/dartsim/BUILD.bazel @@ -13,12 +13,12 @@ load( test_sources = [ "src/Base_TEST.cc", - # "src/Collisions_TEST.cc", + "src/Collisions_TEST.cc", "src/EntityManagement_TEST.cc", "src/JointFeatures_TEST.cc", "src/LinkFeatures_TEST.cc", "src/SDFFeatures_TEST.cc", - # "src/SimulationFeatures_TEST.cc", + "src/SimulationFeatures_TEST.cc", ] sources = [ @@ -51,59 +51,59 @@ public_headers = [ ] cc_binary( - name = "libign_physics-dartsim.so", + name = "libignition-physics2-dartsim.so", srcs = sources + public_headers, includes = ["include", "src"], - linkopts = ["-Wl,-soname,libign_physics-dartsim.so"], + linkopts = ["-Wl,-soname,libignition-physics2-dartsim.so"], linkshared = True, visibility = [], deps = [ "//ign_bazel:utilities", "//ign_plugin/core:ign_plugin", - "//ign_plugin/register:register", + "//ign_plugin/register", "//ign_physics", - "//ign_physics/sdf:sdf", - "//ign_physics/mesh:mesh", + "//ign_physics/sdf", + "//ign_physics/mesh", "//ign_common", - "//ign_common/graphics:graphics", - "//ign_common/profiler:profiler", + "//ign_common/graphics", + "//ign_common/profiler", "//ign_math", - "//ign_math/eigen3:ign_math_eigen3", + "//ign_math/eigen3", "//sdformat", "@eigen3", - "@dart", + "//dart", ], ) cc_library( name = "dartsim", - srcs = ["libign_physics-dartsim.so"], + srcs = ["libignition-physics2-dartsim.so"], hdrs = public_headers, includes = ["include", "src"], visibility = ["//visibility:public"], + deps = [ + "//ign_common", + "//ign_common/graphics", + "//ign_physics/mesh", + "//ign_physics/sdf", + "//sdformat", + ], ) [cc_test( name = src.replace("/", "_").replace(".cc", "").replace("src_", ""), srcs = [src], deps = [ - "//ign_bazel:utilities", - "//ign_math", - "//ign_physics", - "//ign_physics/dartsim:dartsim", - "//ign_physics/sdf:sdf", + ":dartsim", "//ign_physics/test:test_utils", - "//ign_physics/mesh:mesh", - "//ign_common/graphics:graphics", - "//sdformat", - "@dart", "@gtest//:gtest", "@gtest//:gtest_main", - "@eigen3", ], + data = [ "worlds", "//ign_physics:resources" ], local_defines = [ - "TEST_WORLD_DIR='\"TODO: insert the correct string\"'", - "IGNITION_PHYSICS_RESOURCE_DIR='\"TODO: insert the correct string\"'", - "dartsim_plugin_LIB='\"TODO: insert the correct string\"'", + "tpe_plugin_LIB='\"\"'", + "bullet_plugin_LIB='\"\"'", + "TEST_WORLD_DIR='\"./ign_physics/dartsim/worlds/\"'", + "IGNITION_PHYSICS_RESOURCE_DIR='\"./ign_physics/resources/\"'", ], ) for src in test_sources] diff --git a/dartsim/src/Collisions_TEST.cc b/dartsim/src/Collisions_TEST.cc index 33e4d5ca8..b9d5aab17 100644 --- a/dartsim/src/Collisions_TEST.cc +++ b/dartsim/src/Collisions_TEST.cc @@ -58,7 +58,7 @@ std::unordered_set LoadWorlds( const WorldConstructor &_constructor) { ignition::plugin::Loader loader; - loader.LoadLib(_library); + loader.LoadLib(resolveLibrary(_library)); const std::set pluginNames = ignition::physics::FindFeatures3d::From(loader); @@ -85,8 +85,10 @@ class Collisions_TEST public ::testing::WithParamInterface {}; -INSTANTIATE_TEST_CASE_P(PhysicsPlugins, Collisions_TEST, - ::testing::ValuesIn(ignition::physics::test::g_PhysicsPluginLibraries),); // NOLINT +INSTANTIATE_TEST_SUITE_P( + PhysicsPlugins, + Collisions_TEST, + ::testing::ValuesIn(ignition::physics::test::g_PhysicsPluginLibraries)); // NOLINT TestWorldPtr ConstructMeshPlaneWorld( const ignition::physics::Engine3dPtr &_engine, diff --git a/dartsim/src/EntityManagement_TEST.cc b/dartsim/src/EntityManagement_TEST.cc index 3fa84a53c..0125f8c93 100644 --- a/dartsim/src/EntityManagement_TEST.cc +++ b/dartsim/src/EntityManagement_TEST.cc @@ -32,6 +32,8 @@ #include "KinematicsFeatures.hh" #include "ShapeFeatures.hh" +#include "test/Utils.hh" + struct TestFeatureList : ignition::physics::FeatureList< ignition::physics::dartsim::EntityManagementFeatureList, ignition::physics::dartsim::JointFeatureList, @@ -42,7 +44,7 @@ struct TestFeatureList : ignition::physics::FeatureList< TEST(EntityManagement_TEST, ConstructEmptyWorld) { ignition::plugin::Loader loader; - loader.LoadLib(dartsim_plugin_LIB); + loader.LoadLib(DartsimPluginLib()); ignition::plugin::PluginPtr dartsim = loader.Instantiate("ignition::physics::dartsim::Plugin"); @@ -188,7 +190,7 @@ TEST(EntityManagement_TEST, ConstructEmptyWorld) TEST(EntityManagement_TEST, RemoveEntities) { ignition::plugin::Loader loader; - loader.LoadLib(dartsim_plugin_LIB); + loader.LoadLib(DartsimPluginLib()); ignition::plugin::PluginPtr dartsim = loader.Instantiate("ignition::physics::dartsim::Plugin"); diff --git a/dartsim/src/JointFeatures_TEST.cc b/dartsim/src/JointFeatures_TEST.cc index f64e9aa7f..672563187 100644 --- a/dartsim/src/JointFeatures_TEST.cc +++ b/dartsim/src/JointFeatures_TEST.cc @@ -70,7 +70,7 @@ class JointFeaturesFixture : public ::testing::Test protected: void SetUp() override { ignition::plugin::Loader loader; - loader.LoadLib(dartsim_plugin_LIB); + loader.LoadLib(DartsimPluginLib()); ignition::plugin::PluginPtr dartsim = loader.Instantiate("ignition::physics::dartsim::Plugin"); diff --git a/dartsim/src/LinkFeatures_TEST.cc b/dartsim/src/LinkFeatures_TEST.cc index 8d654d7a7..a309ebd1c 100644 --- a/dartsim/src/LinkFeatures_TEST.cc +++ b/dartsim/src/LinkFeatures_TEST.cc @@ -60,7 +60,7 @@ class LinkFeaturesFixture : public ::testing::Test protected: void SetUp() override { ignition::plugin::Loader loader; - loader.LoadLib(dartsim_plugin_LIB); + loader.LoadLib(DartsimPluginLib()); ignition::plugin::PluginPtr dartsim = loader.Instantiate("ignition::physics::dartsim::Plugin"); diff --git a/dartsim/src/SDFFeatures_TEST.cc b/dartsim/src/SDFFeatures_TEST.cc index 455464e02..1d6dc37d7 100644 --- a/dartsim/src/SDFFeatures_TEST.cc +++ b/dartsim/src/SDFFeatures_TEST.cc @@ -59,7 +59,7 @@ using WorldPtr = ignition::physics::World3dPtr; auto LoadEngine() { ignition::plugin::Loader loader; - loader.LoadLib(dartsim_plugin_LIB); + loader.LoadLib(DartsimPluginLib()); ignition::plugin::PluginPtr dartsim = loader.Instantiate("ignition::physics::dartsim::Plugin"); diff --git a/dartsim/src/SimulationFeatures_TEST.cc b/dartsim/src/SimulationFeatures_TEST.cc index 5c68f3304..e3566ed44 100644 --- a/dartsim/src/SimulationFeatures_TEST.cc +++ b/dartsim/src/SimulationFeatures_TEST.cc @@ -60,7 +60,7 @@ std::unordered_set LoadWorlds( const std::string &_world) { ignition::plugin::Loader loader; - loader.LoadLib(_library); + loader.LoadLib(resolveLibrary(_library)); const std::set pluginNames = ignition::physics::FindFeatures3d::From(loader); @@ -286,8 +286,8 @@ TEST_P(SimulationFeatures_TEST, RetrieveContacts) } } -INSTANTIATE_TEST_CASE_P(PhysicsPlugins, SimulationFeatures_TEST, - ::testing::ValuesIn(ignition::physics::test::g_PhysicsPluginLibraries),); // NOLINT +INSTANTIATE_TEST_SUITE_P(PhysicsPlugins, SimulationFeatures_TEST, + ::testing::ValuesIn(ignition::physics::test::g_PhysicsPluginLibraries)); // NOLINT int main(int argc, char *argv[]) { diff --git a/mesh/BUILD.bazel b/mesh/BUILD.bazel index 8f899a9e2..a8c2b6565 100644 --- a/mesh/BUILD.bazel +++ b/mesh/BUILD.bazel @@ -3,20 +3,9 @@ public_headers = [ "include/ignition/physics/mesh/detail/MeshShape.hh", ] -cc_binary( - name = "libign_physics-mesh.so", - srcs = public_headers, - includes = ["include"], - linkopts = ["-Wl,-soname,libign_physics-mesh.so"], - linkshared = True, - visibility = [], - deps = [ - ], -) - cc_library( name = "mesh", - srcs = ["libign_physics-mesh.so"], + srcs = public_headers, hdrs = public_headers, includes = ["include"], visibility = ["//visibility:public"], diff --git a/sdf/BUILD.bazel b/sdf/BUILD.bazel index ed7861f70..f62ce80d7 100644 --- a/sdf/BUILD.bazel +++ b/sdf/BUILD.bazel @@ -7,20 +7,9 @@ public_headers = [ "include/ignition/physics/sdf/ConstructWorld.hh", ] -cc_binary( - name = "libign_physics-sdf.so", - srcs = public_headers, - includes = ["include"], - linkopts = ["-Wl,-soname,libign_physics-sdf.so"], - linkshared = True, - visibility = [], - deps = [ - ], -) - cc_library( name = "sdf", - srcs = ["libign_physics-sdf.so"], + srcs = public_headers, hdrs = public_headers, includes = ["include"], visibility = ["//visibility:public"], diff --git a/test/BUILD.bazel b/test/BUILD.bazel index 4ce682a93..7e20b5bc4 100644 --- a/test/BUILD.bazel +++ b/test/BUILD.bazel @@ -22,15 +22,15 @@ cc_library( "//ign_common", "//ign_physics", "//ign_math", - "//ign_math/eigen3:ign_math_eigen3", + "//ign_math/eigen3", "//ign_plugin/core:ign_plugin", - "//ign_plugin/register:register", - "//ign_plugin/loader:loader", + "//ign_plugin/register", + "//ign_plugin/loader", "//ign_bazel:utilities", "@eigen3", ], include_prefix = "test", local_defines = [ - "IGNITION_PHYSICS_RESOURCE_DIR='\"TODO: insert the correct string\"'", + "IGNITION_PHYSICS_RESOURCE_DIR='\"./ign_physics/resources/\"'", ], ) diff --git a/test/PhysicsPluginsList.hh b/test/PhysicsPluginsList.hh index 99c80f652..2d6b19e4b 100644 --- a/test/PhysicsPluginsList.hh +++ b/test/PhysicsPluginsList.hh @@ -21,8 +21,11 @@ #include #include +#include +#include + #ifndef dartsim_plugin_LIB -#define dartsim_plugin_LIB "" +#define dartsim_plugin_LIB "__main__/ign_physics/dartsim/libignition-physics2-dartsim.so" #endif #ifndef bullet_plugin_LIB @@ -30,9 +33,42 @@ #endif #ifndef tpe_plugin_LIB -#define tpe_plugin_LIB "" +#define tpe_plugin_LIB "__main__/ign_physics/tpe/libignition-physics2-tpe.so" #endif +///////////////////////////////////////////////// +std::string resolveLibrary(const std::string &_path) +{ + auto it = _path.find("__main__"); + if(it != std::string::npos && it == 0) + { + std::string dataDir; + if (ignition::common::env("TEST_SRCDIR", dataDir)) + { + return ignition::common::joinPaths(dataDir, _path); + } + } + return _path; +} + +///////////////////////////////////////////////// +std::string DartsimPluginLib() +{ + return resolveLibrary(dartsim_plugin_LIB); +} + +///////////////////////////////////////////////// +std::string TpePluginLib() +{ + return resolveLibrary(tpe_plugin_LIB); +} + +///////////////////////////////////////////////// +std::string BulletPluginLib() +{ + return resolveLibrary(bullet_plugin_LIB); +} + namespace ignition { namespace physics diff --git a/test/Utils.hh b/test/Utils.hh index 6abbb2915..d0cd7f6ca 100644 --- a/test/Utils.hh +++ b/test/Utils.hh @@ -22,6 +22,8 @@ #include #include +#include "test/PhysicsPluginsList.hh" + namespace ignition { namespace physics diff --git a/tpe/BUILD.bazel b/tpe/BUILD.bazel new file mode 100644 index 000000000..e963ff4b5 --- /dev/null +++ b/tpe/BUILD.bazel @@ -0,0 +1,145 @@ +load( + "//ign_bazel:generate_file.bzl", + "generate_file", +) + +lib_test_sources = glob(["lib/src/*_TEST.cc"]) +lib_sources = glob(["lib/src/*.cc"], exclude=["lib/src/*_TEST.cc"]) +lib_headers = glob(["lib/src/*.hh"]) + +plugin_test_sources = glob(["plugin/src/*_TEST.cc"]) +plugin_sources = glob(["plugin/src/*.cc"], exclude=["plugin/src/*_TEST.cc"]) +plugin_headers = glob(["plugin/src/*.hh"]) + +generate_file( + name = "include/ignition/physics/tpelib/Export.hh", + content = """ +#pragma once +// IGN_DEPRECATED is defined by all ignition libraries, but the version below +// is a simplified version. When mixing the regular ignition libraries and +// the drake compiled ignition libraries, the compiler throws a warning about +// the macro being multiply defined. We undefine it before redefining it here +// to work around that issue. Note that the IGNITION_PHYSICS_VISIBLE macro +// shouldn't be defined multiple times, but we undefine it just in case. +#ifdef IGNITION_PHYSICS_TPELIB_VISIBLE +#undef IGNITION_PHYSICS_TPELIB_VISIBLE +#endif +#define IGNITION_PHYSICS_TPELIB_VISIBLE __attribute__ ((visibility("default"))) +#ifdef IGN_DEPRECATED +#undef IGN_DEPRECATED +#endif +#define IGN_DEPRECATED(version) __attribute__ ((__deprecated__)) + """, + visibility = ["//visibility:private"], +) + +cc_binary( + name = "libignition-physics2-tpelib.so", + srcs = + lib_sources + + lib_headers + ["include/ignition/physics/tpelib/Export.hh"], + includes = ["lib/src", "include", "."], + linkopts = ["-Wl,-soname,libignition-physics2-tpelib.so"], + linkshared = True, + visibility = [], + deps = [ + "//ign_bazel:utilities", + "//ign_plugin/core:ign_plugin", + "//ign_plugin/register", + "//ign_physics", + "//ign_physics/sdf", + "//ign_physics/mesh", + "//ign_common", + "//ign_common/graphics", + "//ign_common/profiler", + "//ign_math", + "//ign_math/eigen3", + "//sdformat", + ], +) + +cc_library( + name = "tpelib", + srcs = ["libignition-physics2-tpelib.so"], + hdrs = lib_headers + ["include/ignition/physics/tpelib/Export.hh"], + includes = ["lib/src", "include", "."], + visibility = ["//visibility:private"], + deps = [ + "//ign_bazel:utilities", + "//ign_common", + "//ign_common/graphics", + "//ign_physics/sdf", + "//sdformat", + ], +) + +[ + cc_test( + name = src.replace("/", "_").replace(".cc", "").replace("lib_src_", ""), + srcs = [src], + includes = [".", "lib/src"], + deps = [ + ":tpelib", + "@gtest//:gtest", + "@gtest//:gtest_main", + ], +) for src in lib_test_sources] + +cc_binary( + name = "libignition-physics2-tpe.so", + srcs = plugin_sources + plugin_headers, + includes = ["plugin/src", "include"], + linkopts = ["-Wl,-soname,libignition-physics2-tpe.so"], + linkshared = True, + visibility = [], + deps = [ + ":tpelib", + "//ign_bazel:utilities", + "//ign_plugin/core:ign_plugin", + "//ign_plugin/register", + "//ign_physics", + "//ign_physics/sdf", + "//ign_physics/mesh", + "//ign_common", + "//ign_common/graphics", + "//ign_common/profiler", + "//ign_math", + "//ign_math/eigen3", + "//sdformat", + ], +) + +cc_library( + name = "tpe", + srcs = ["libignition-physics2-tpe.so"], + hdrs = plugin_headers, + visibility = ["//visibility:public"], + includes = ["plugin/src"], + deps = [ + ":tpelib", + "//ign_physics/mesh", + "//ign_physics/sdf", + "//sdformat", + ] +) + +[ + cc_test( + name = src.replace("/", "_").replace(".cc", "").replace("plugin_src_", ""), + srcs = [src], + deps = [ + ":tpe", + "//ign_physics/test:test_utils", + "//ign_plugin/core:ign_plugin", + "@gtest//:gtest", + "@gtest//:gtest_main", + ], + data = ["plugin/worlds"], + local_defines = [ + "dartsim_plugin_LIB='\"\"'", + "bullet_plugin_LIB='\"\"'", + "TEST_WORLD_DIR='\"./ign_physics/tpe/plugin/worlds/\"'", + "IGNITION_PHYSICS_RESOURCE_DIR='\"./ign_physics/resources/\"'", + ], +) for src in plugin_test_sources] + diff --git a/tpe/plugin/src/EntityManagement_TEST.cc b/tpe/plugin/src/EntityManagement_TEST.cc index bdc312eef..d21afdd50 100644 --- a/tpe/plugin/src/EntityManagement_TEST.cc +++ b/tpe/plugin/src/EntityManagement_TEST.cc @@ -23,6 +23,8 @@ #include "EntityManagementFeatures.hh" +#include "test/Utils.hh" + struct TestFeatureList : ignition::physics::FeatureList< ignition::physics::tpeplugin::EntityManagementFeatureList > { }; @@ -30,7 +32,7 @@ struct TestFeatureList : ignition::physics::FeatureList< TEST(EntityManagement_TEST, ConstructEmptyWorld) { ignition::plugin::Loader loader; - loader.LoadLib(tpe_plugin_LIB); + loader.LoadLib(TpePluginLib()); ignition::plugin::PluginPtr tpe_plugin = loader.Instantiate("ignition::physics::tpeplugin::Plugin"); @@ -84,7 +86,9 @@ TEST(EntityManagement_TEST, ConstructEmptyWorld) TEST(EntityManagement_TEST, RemoveEntities) { ignition::plugin::Loader loader; - loader.LoadLib(tpe_plugin_LIB); + auto list = loader.LoadLib(TpePluginLib()); + + std::cout << TpePluginLib() << " " << list.size() << std::endl; ignition::plugin::PluginPtr tpe_plugin = loader.Instantiate("ignition::physics::tpeplugin::Plugin"); diff --git a/tpe/plugin/src/SDFFeatures_TEST.cc b/tpe/plugin/src/SDFFeatures_TEST.cc index 9695080e6..c0d5df84c 100644 --- a/tpe/plugin/src/SDFFeatures_TEST.cc +++ b/tpe/plugin/src/SDFFeatures_TEST.cc @@ -51,7 +51,7 @@ using WorldPtr = ignition::physics::World3dPtr; auto LoadEngine() { ignition::plugin::Loader loader; - loader.LoadLib(tpe_plugin_LIB); + loader.LoadLib(TpePluginLib()); ignition::plugin::PluginPtr tpe_plugin = loader.Instantiate("ignition::physics::tpeplugin::Plugin"); diff --git a/tpe/plugin/src/SimulationFeatures_TEST.cc b/tpe/plugin/src/SimulationFeatures_TEST.cc index 767de90aa..1540fa99a 100644 --- a/tpe/plugin/src/SimulationFeatures_TEST.cc +++ b/tpe/plugin/src/SimulationFeatures_TEST.cc @@ -59,7 +59,7 @@ std::unordered_set LoadWorlds( const std::string &_world) { ignition::plugin::Loader loader; - loader.LoadLib(_library); + loader.LoadLib(resolveLibrary(_library)); const std::set pluginNames = ignition::physics::FindFeatures3d::From(loader); @@ -350,8 +350,10 @@ TEST_P(SimulationFeatures_TEST, RetrieveContacts) } } -INSTANTIATE_TEST_CASE_P(PhysicsPlugins, SimulationFeatures_TEST, - ::testing::ValuesIn(ignition::physics::test::g_PhysicsPluginLibraries),); // NOLINT +INSTANTIATE_TEST_SUITE_P( + PhysicsPlugins, + SimulationFeatures_TEST, + ::testing::ValuesIn(ignition::physics::test::g_PhysicsPluginLibraries)); // NOLINT int main(int argc, char *argv[]) {