mirror of
https://github.com/google/googletest.git
synced 2024-12-27 10:11:03 +08:00
Support --gtest_stream_result_to on macOS
This seems to just have been an oversight. POSIX socket APIs work just fine on macOS. Fixes https://github.com/google/googletest/issues/4214. PiperOrigin-RevId: 523398386 Change-Id: I9d56cd9c6933318c1f0b0024f7fef44122fd0c83
This commit is contained in:
parent
057b4e904f
commit
7f6f9c12ad
@ -693,7 +693,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
|
||||
#if defined(GTEST_OS_LINUX) || defined(GTEST_OS_GNU_KFREEBSD) || \
|
||||
defined(GTEST_OS_DRAGONFLY) || defined(GTEST_OS_FREEBSD) || \
|
||||
defined(GTEST_OS_NETBSD) || defined(GTEST_OS_OPENBSD) || \
|
||||
defined(GTEST_OS_GNU_HURD)
|
||||
defined(GTEST_OS_GNU_HURD) || defined(GTEST_OS_MAC)
|
||||
#define GTEST_CAN_STREAM_RESULTS_ 1
|
||||
#else
|
||||
#define GTEST_CAN_STREAM_RESULTS_ 0
|
||||
|
@ -43,6 +43,7 @@ import sys
|
||||
from googletest.test import gtest_test_utils
|
||||
|
||||
|
||||
IS_DARWIN = os.name == 'posix' and os.uname()[0] == 'Darwin'
|
||||
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
|
||||
IS_GNUHURD = os.name == 'posix' and os.uname()[0] == 'GNU'
|
||||
IS_GNUKFREEBSD = os.name == 'posix' and os.uname()[0] == 'GNU/kFreeBSD'
|
||||
@ -136,7 +137,7 @@ class GTestHelpTest(gtest_test_utils.TestCase):
|
||||
|
||||
self.assertTrue(HELP_REGEX.search(output), output)
|
||||
|
||||
if IS_LINUX or IS_GNUHURD or IS_GNUKFREEBSD or IS_OPENBSD:
|
||||
if IS_DARWIN or IS_LINUX or IS_GNUHURD or IS_GNUKFREEBSD or IS_OPENBSD:
|
||||
self.assertIn(STREAM_RESULT_TO_FLAG, output)
|
||||
else:
|
||||
self.assertNotIn(STREAM_RESULT_TO_FLAG, output)
|
||||
|
Loading…
x
Reference in New Issue
Block a user