Skip to content

Commit

Permalink
Fix gz test on windows (#131)
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey authored Nov 13, 2023
1 parent d493371 commit 944bd8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions loader/src/cmd/cmdplugin.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# limitations under the License.

require 'open3'
require 'pathname'

# Constants.
LIBRARY_VERSION = '@PROJECT_VERSION_FULL@'
Expand All @@ -30,10 +31,7 @@ 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.
else
unless Pathname.new(exe_name).absolute?
# We're assuming that the library path is relative to the current
# location of this script.
exe_name = File.expand_path(File.join(File.dirname(__FILE__), exe_name))
Expand Down
4 changes: 3 additions & 1 deletion loader/src/gz_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <iostream>
#include <string>

#include <gz/utils/ExtraTestMacros.hh>

#include "gtest/gtest.h"
#include "gz/plugin/Loader.hh"

Expand Down Expand Up @@ -211,7 +213,7 @@ TEST(gzTest, PluginInfoVerboseDummyPlugins)

//////////////////////////////////////////////////
/// \brief Check --help message and bash completion script for consistent flags
TEST(gzTest, PluginHelpVsCompletionFlags)
TEST(gzTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(PluginHelpVsCompletionFlags))
{
// Path to gz executable
std::string gz = std::string(GZ_PATH);
Expand Down

0 comments on commit 944bd8c

Please sign in to comment.