diff options
author | Gennadiy Civil <misterg@google.com> | 2018-01-22 16:47:30 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-01-22 16:47:30 (GMT) |
commit | 8d707dfe817df153efd6fe7832b6149244ed7665 (patch) | |
tree | 49481950a0bc991e97ec8d9111e722e7cc4b3545 /googletest/test/gtest_test_utils.py | |
parent | 62ba5d91d0ceff98fbd95294bd94c97017a07f9e (diff) | |
download | googletest-8d707dfe817df153efd6fe7832b6149244ed7665.zip googletest-8d707dfe817df153efd6fe7832b6149244ed7665.tar.gz googletest-8d707dfe817df153efd6fe7832b6149244ed7665.tar.bz2 |
code merge
Diffstat (limited to 'googletest/test/gtest_test_utils.py')
-rwxr-xr-x | googletest/test/gtest_test_utils.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/googletest/test/gtest_test_utils.py b/googletest/test/gtest_test_utils.py index d2b6748..89d1469 100755 --- a/googletest/test/gtest_test_utils.py +++ b/googletest/test/gtest_test_utils.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # Copyright 2006, Google Inc. # All rights reserved. # @@ -33,10 +31,15 @@ __author__ = 'wan@google.com (Zhanyong Wan)' -import atexit import os -import shutil import sys + +IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux' +IS_WINDOWS = os.name == 'nt' +IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0] + +import atexit +import shutil import tempfile import unittest _test_module = unittest @@ -53,9 +56,6 @@ except: GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT' -IS_WINDOWS = os.name == 'nt' -IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0] - # The environment variable for specifying the path to the premature-exit file. PREMATURE_EXIT_FILE_ENV_VAR = 'TEST_PREMATURE_EXIT_FILE' @@ -178,7 +178,7 @@ def GetTestExecutablePath(executable_name, build_dir=None): 'Unable to find the test binary "%s". Please make sure to provide\n' 'a path to the binary via the --build_dir flag or the BUILD_DIR\n' 'environment variable.' % path) - sys.stdout.write(message) + print >> sys.stderr, message sys.exit(1) return path |