Skip to content

Commit

Permalink
Disable cmdline tests on homebrew (#260)
Browse files Browse the repository at this point in the history
* Disable cmdline tests on homebrew
* Fix import

Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>

---------

Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
  • Loading branch information
Blast545 authored May 28, 2024
1 parent 3c40338 commit 837e3dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ set (gtest_sources
ign_TEST.cc
)

# Disable tests that need CLI on homebrew
if (APPLE)
list(REMOVE_ITEM gtest_sources ign_TEST.cc)
endif()

# Create the library target.
ign_create_core_library(SOURCES ${sources} CXX_STANDARD 17)

Expand Down
6 changes: 4 additions & 2 deletions src/ign_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <ignition/common/Filesystem.hh>
#include "ignition/launch/test_config.hh" // NOLINT(build/include)

#include <ignition/utilities/ExtraTestMacros.hh>

static const std::string kIgnCommand(
std::string("IGN_CONFIG_PATH=") + IGN_CONFIG_PATH + " " +
std::string(BREW_RUBY) + std::string(IGN_PATH) + " launch ");
Expand Down Expand Up @@ -51,7 +53,7 @@ std::string customExecStr(std::string _cmd)
}

/////////////////////////////////////////////////
TEST(CmdLine, Ls)
TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_MAC(Ls))
{
std::string cmd = kIgnCommand +
std::string(PROJECT_SOURCE_PATH) + "/test/config/ls.ign";
Expand All @@ -65,7 +67,7 @@ TEST(CmdLine, Ls)
}

/////////////////////////////////////////////////
TEST(CmdLine, EchoSelf)
TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_MAC(EchoSelf))
{
std::string filePath =
std::string(PROJECT_SOURCE_PATH) + "/test/config/echo.ign";
Expand Down

0 comments on commit 837e3dc

Please sign in to comment.