Skip to content

Commit

Permalink
Fix plugin_exe_location and improve coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Nov 17, 2021
1 parent 838dd0d commit 6e184ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions loader/src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ target_link_libraries(${plugin_executable}
${loader}
)

set(INSTALL_STANDALONE_EXECUTABLE "${IGN_LIB_INSTALL_DIR}/ignition/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}")
set(EXE_INSTALL_DIR "${IGN_LIB_INSTALL_DIR}/ignition/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}")

install(
TARGETS
${plugin_executable}
DESTINATION
${INSTALL_STANDALONE_EXECUTABLE}
${EXE_INSTALL_DIR}
)

#===============================================================================
Expand Down Expand Up @@ -52,7 +52,7 @@ set(cmd_script_configured "${CMAKE_CURRENT_BINARY_DIR}/cmd${IGN_DESIGNATION}${PR

# Set the library_location variable to the relative path to the library file
# within the install directory structure.
set(library_location "../../../${CMAKE_INSTALL_LIBDIR}/$<TARGET_FILE_NAME:${loader}>")
set(plugin_exe_location "../../../${EXE_INSTALL_DIR}/$<TARGET_FILE_NAME:${plugin_executable}>")

configure_file(
"cmd${IGN_DESIGNATION}.rb.in"
Expand Down
8 changes: 8 additions & 0 deletions loader/src/ign_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ TEST(ignTest, IgnPluginHelp)
EXPECT_NE(std::string::npos,
output.find("-p,--plugin TEXT Needs: --info"))
<< output;

output = custom_exec_str(ign + " plugin");
EXPECT_NE(std::string::npos,
output.find("-i,--info Get info about a plugin."))
<< output;
EXPECT_NE(std::string::npos,
output.find("-p,--plugin TEXT Needs: --info"))
<< output;
}

//////////////////////////////////////////////////
Expand Down

0 comments on commit 6e184ae

Please sign in to comment.