Skip to content

Commit

Permalink
disable test on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nkoenig authored and chapulina committed Jul 19, 2022
1 parent 5913f5d commit 73e9448
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 6 additions & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/test
)

set (test_sources
ign_TEST.cc
)

# Skip command line tests for Windows, see
# https://bitbucket.org/ignitionrobotics/ign-msgs/issues/28
if (MSVC)
list(REMOVE_ITEM test_sources ign_TEST.cc)
endif()

if (IGNITION-TOOLS_BINARY_DIRS)
ign_build_tests(TYPE UNIT SOURCES ${test_sources})
endif ()
2 changes: 0 additions & 2 deletions tools/ign_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,13 @@ int main(int argc, char **argv)

// Make sure that we load the library recently built and not the one installed
// in your system.
#ifndef _WIN32
// Add the directory where ignition msgs has been built.
std::string value = std::string(IGN_TEST_LIBRARY_PATH);
// Save the current value of LD_LIBRARY_PATH.
auto cvalue = std::getenv("LD_LIBRARY_PATH");
if (cvalue)
value += ":" + std::string(cvalue);
setenv("LD_LIBRARY_PATH", value.c_str(), 1);
#endif

::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
Expand Down

0 comments on commit 73e9448

Please sign in to comment.