Makes Google Test compile on Mac OS X and Cygwin, and adds project files for Microsoft Visual Studio.

This commit is contained in:
shiqian
2008-07-09 20:58:26 +00:00
parent e4e9a8bd7d
commit e0ecb7ac58
16 changed files with 1545 additions and 9 deletions

View File

@@ -74,10 +74,14 @@ def SetEnvVar(env_var, value):
def Run(command):
"""Runs a command; returns 1 if it has a segmentation fault, or 0 otherwise.
"""Runs a command; returns 1 if it was killed by a signal, or 0 otherwise.
"""
return os.system(command) == signal.SIGSEGV
exit_code = os.system(command)
# On Unix-like systems, the lowest 8 bits of the exit code is the
# signal number that killed the process (or 0 if it wasn't killed by
# a signal).
return (exit_code & 255) != 0
# The unit test.