Skip to content

Commit c4c6cd7

Browse files
committed
Fix gz test on windows
Signed-off-by: Addisu Z. Taddese <[email protected]>
1 parent d493371 commit c4c6cd7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

loader/src/cmd/cmdplugin.rb.in

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# limitations under the License.
1616

1717
require 'open3'
18+
require 'pathname'
1819

1920
# Constants.
2021
LIBRARY_VERSION = '@PROJECT_VERSION_FULL@'
@@ -30,10 +31,7 @@ class Cmd
3031
command = args[0]
3132
exe_name = COMMANDS[command]
3233

33-
if exe_name[0] == '/'
34-
# If the first character is a slash, we'll assume that we've been given an
35-
# absolute path to the executable. This is only used during test mode.
36-
else
34+
unless Pathname.new(exe_name).absolute?
3735
# We're assuming that the library path is relative to the current
3836
# location of this script.
3937
exe_name = File.expand_path(File.join(File.dirname(__FILE__), exe_name))

loader/src/gz_TEST.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include <iostream>
2121
#include <string>
2222

23+
#include <gz/utils/ExtraTestMacros.hh>
24+
2325
#include "gtest/gtest.h"
2426
#include "gz/plugin/Loader.hh"
2527

@@ -211,7 +213,7 @@ TEST(gzTest, PluginInfoVerboseDummyPlugins)
211213

212214
//////////////////////////////////////////////////
213215
/// \brief Check --help message and bash completion script for consistent flags
214-
TEST(gzTest, PluginHelpVsCompletionFlags)
216+
TEST(gzTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(PluginHelpVsCompletionFlags))
215217
{
216218
// Path to gz executable
217219
std::string gz = std::string(GZ_PATH);

0 commit comments

Comments
 (0)