diff options
author | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-01-10 01:16:33 +0000 |
---|---|---|
committer | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-01-10 01:16:33 +0000 |
commit | fe186c382905dcf57014985ccea8e067275e9f5f (patch) | |
tree | b857251b28c8d30b4338f9107abb8a1541f355d2 /test/gtest_output_test.py | |
parent | 53e0dc4041f660b6517b15b08b496e164be614f1 (diff) | |
download | googletest-fe186c382905dcf57014985ccea8e067275e9f5f.tar.gz googletest-fe186c382905dcf57014985ccea8e067275e9f5f.tar.bz2 googletest-fe186c382905dcf57014985ccea8e067275e9f5f.zip |
Implements --gtest_also_run_disabled_tests. By Eric Roman.
Diffstat (limited to 'test/gtest_output_test.py')
-rwxr-xr-x | test/gtest_output_test.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/gtest_output_test.py b/test/gtest_output_test.py index 68cfe5ec..42cf00c4 100755 --- a/test/gtest_output_test.py +++ b/test/gtest_output_test.py @@ -40,12 +40,12 @@ SYNOPSIS __author__ = 'wan@google.com (Zhanyong Wan)' -import gtest_test_utils import os import re import string import sys import unittest +import gtest_test_utils # The flag for generating the golden file @@ -64,10 +64,13 @@ PROGRAM_PATH = os.path.join(gtest_test_utils.GetBuildDir(), PROGRAM) COMMAND_WITH_COLOR = PROGRAM_PATH + ' --gtest_color=yes' COMMAND_WITH_TIME = (PROGRAM_PATH + ' --gtest_print_time ' + '--gtest_filter="FatalFailureTest.*:LoggingTest.*"') +COMMAND_WITH_DISABLED = (PROGRAM_PATH + ' --gtest_also_run_disabled_tests ' + + '--gtest_filter="*DISABLED_*"') GOLDEN_PATH = os.path.join(gtest_test_utils.GetSourceDir(), GOLDEN_NAME) + def ToUnixLineEnding(s): """Changes all Windows/Mac line endings in s to UNIX line endings.""" @@ -191,7 +194,8 @@ def GetCommandOutput(cmd): class GTestOutputTest(unittest.TestCase): def testOutput(self): output = (GetCommandOutput(COMMAND_WITH_COLOR) + - GetCommandOutput(COMMAND_WITH_TIME)) + GetCommandOutput(COMMAND_WITH_TIME) + + GetCommandOutput(COMMAND_WITH_DISABLED)) golden_file = open(GOLDEN_PATH, 'rb') golden = golden_file.read() golden_file.close() @@ -206,7 +210,8 @@ class GTestOutputTest(unittest.TestCase): if __name__ == '__main__': if sys.argv[1:] == [GENGOLDEN_FLAG]: output = (GetCommandOutput(COMMAND_WITH_COLOR) + - GetCommandOutput(COMMAND_WITH_TIME)) + GetCommandOutput(COMMAND_WITH_TIME) + + GetCommandOutput(COMMAND_WITH_DISABLED)) golden_file = open(GOLDEN_PATH, 'wb') golden_file.write(output) golden_file.close() |