diff options
Diffstat (limited to 'googletest/test')
-rw-r--r-- | googletest/test/googletest-filepath-test.cc | 2 | ||||
-rw-r--r-- | googletest/test/googletest-options-test.cc | 6 | ||||
-rwxr-xr-x | googletest/test/gtest_test_utils.py | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/googletest/test/googletest-filepath-test.cc b/googletest/test/googletest-filepath-test.cc index 37f02fb..72d1c44 100644 --- a/googletest/test/googletest-filepath-test.cc +++ b/googletest/test/googletest-filepath-test.cc @@ -80,7 +80,7 @@ TEST(GetCurrentDirTest, ReturnsCurrentDir) { const FilePath cwd = FilePath::GetCurrentDir(); posix::ChDir(original_dir.c_str()); -# if GTEST_OS_WINDOWS +# if GTEST_OS_WINDOWS || GTEST_OS_OS2 // Skips the ":". const char* const cwd_without_drive = strchr(cwd.c_str(), ':'); diff --git a/googletest/test/googletest-options-test.cc b/googletest/test/googletest-options-test.cc index edd4eba..7a27a72 100644 --- a/googletest/test/googletest-options-test.cc +++ b/googletest/test/googletest-options-test.cc @@ -102,6 +102,12 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) { _strcmpi("gtest-options-ex_test", exe_str.c_str()) == 0 || _strcmpi("gtest_all_test", exe_str.c_str()) == 0 || _strcmpi("gtest_dll_test", exe_str.c_str()) == 0; +#elif GTEST_OS_OS2 + const bool success = + strcasecmp("googletest-options-test", exe_str.c_str()) == 0 || + strcasecmp("gtest-options-ex_test", exe_str.c_str()) == 0 || + strcasecmp("gtest_all_test", exe_str.c_str()) == 0 || + strcasecmp("gtest_dll_test", exe_str.c_str()) == 0; #elif GTEST_OS_FUCHSIA const bool success = exe_str == "app"; #else diff --git a/googletest/test/gtest_test_utils.py b/googletest/test/gtest_test_utils.py index 43cba8f..245dcb1 100755 --- a/googletest/test/gtest_test_utils.py +++ b/googletest/test/gtest_test_utils.py @@ -36,6 +36,7 @@ import sys IS_WINDOWS = os.name == 'nt' IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0] +IS_OS2 = os.name == 'os2' import atexit import shutil @@ -164,7 +165,7 @@ def GetTestExecutablePath(executable_name, build_dir=None): path = os.path.abspath(os.path.join(build_dir or GetBuildDir(), executable_name)) - if (IS_WINDOWS or IS_CYGWIN) and not path.endswith('.exe'): + if (IS_WINDOWS or IS_CYGWIN or IS_OS2) and not path.endswith('.exe'): path += '.exe' if not os.path.exists(path): |