Skip to content

Commit

Permalink
Disable failing windows tests (#255)
Browse files Browse the repository at this point in the history
* Disable `ManagerTest.RunLs` test on windows
* Add dependency on ign-utils
* Use Pathname to determine if path is absolute
* Disable ign_TEST on windows, disable ManagerTest.RunEnvPre because it timesout
* Disable one more test on windows
---------

Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey authored May 21, 2024
1 parent efe7404 commit 6459d02
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}
LIB_DEPS
${PROJECT_LIBRARY_TARGET_NAME}
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
ignition-utils${IGN_UTILS_VER}::core
)

add_subdirectory(cmd)
8 changes: 4 additions & 4 deletions src/Manager_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <ignition/common/Console.hh>
#include <ignition/common/Filesystem.hh>

#include <ignition/utilities/ExtraTestMacros.hh>
#include <ignition/utils/ExtraTestMacros.hh>

#include <sys/stat.h>

Expand Down Expand Up @@ -112,7 +112,7 @@ TEST_F(ManagerTest, RunBadXml)
}

/////////////////////////////////////////////////
TEST_F(ManagerTest, RunLs)
TEST_F(ManagerTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(RunLs))
{
std::string cmd;

Expand All @@ -137,7 +137,7 @@ TEST_F(ManagerTest, RunLs)
}

/////////////////////////////////////////////////
TEST_F(ManagerTest, RunEnvPre)
TEST_F(ManagerTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(RunEnvPre))
{
// Test that environment is applied regardless of order
#ifndef _WIN32
Expand Down Expand Up @@ -175,7 +175,7 @@ TEST_F(ManagerTest, RunEnvPre)
}

/////////////////////////////////////////////////
TEST_F(ManagerTest, RunEnvPost)
TEST_F(ManagerTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(RunEnvPost))
{
// Test that environment is applied regardless of order
#ifndef _WIN32
Expand Down
5 changes: 5 additions & 0 deletions src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# "gtest_sources" variable.
ign_get_libsources_and_unittests(sources gtest_sources)

# Disable tests that need CLI if ign-tools is not found
if (MSVC OR NOT IGN_TOOLS_PROGRAM)
list(REMOVE_ITEM gtest_sources ign_TEST.cc)
endif()

add_library(ign STATIC ign.cc)
target_include_directories(ign PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(ign PUBLIC
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/cmdlaunch.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

require 'pathname'
# Constants.
LIBRARY_VERSION = '@PROJECT_VERSION_FULL@'
COMMANDS = {
Expand All @@ -28,9 +29,8 @@ class Cmd
command = args[0]
exe_name = COMMANDS[command]

if exe_name[0] == '/'
# If the first character is a slash, we'll assume that we've been given an
# absolute path to the executable. This is only used during test mode.
if Pathname.new(exe_name).absolute?
# The exe_name can be absolute path during test. We'll leave it unchanged
else
# We're assuming that the library path is relative to the current
# location of this script.
Expand Down

0 comments on commit 6459d02

Please sign in to comment.