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

[Bazel] Enable test for plugin #268

Open
francocipollone opened this issue Jan 5, 2024 · 0 comments
Open

[Bazel] Enable test for plugin #268

francocipollone opened this issue Jan 5, 2024 · 0 comments

Comments

@francocipollone
Copy link
Collaborator

Summary

Related to #246

In the test road_network_plugin_test.cc we have:

// Resource folder path defined via compile definition.
static constexpr char kMalidriveResourceFolder[] = DEF_MALIDRIVE_RESOURCES;

GTEST_TEST(RoadNetworkLoader, VerifyRoadNetworkPlugin) {
  setenv("MALIPUT_PLUGIN_PATH", DEF_ROAD_NETWORK_PLUGIN, 1);
  const std::string kXodrFilePath{utility::FindResourceInPath("TShapeRoad.xodr", kMalidriveResourceFolder)};

In cmake world we have a compile definition for locating the resources and the plugin in the test suite:

    set(RESOURCE_FILE_PREFIX ${PROJECT_SOURCE_DIR}/resources/)
    set(ROAD_NETWORK_PLUGIN ${CMAKE_INSTALL_PREFIX}/lib/maliput_plugins/)
    target_compile_definitions(${BINARY_NAME}
      PRIVATE
        DEF_MALIDRIVE_RESOURCES="${RESOURCE_FILE_PREFIX}"
        DEF_ROAD_NETWORK_PLUGIN="${ROAD_NETWORK_PLUGIN}"
    )

Victory condition

Resolve this for the bazel world and enable testing for the plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Inbox
Development

No branches or pull requests

1 participant