diff options
author | Gennadiy Civil <misterg@google.com> | 2018-08-01 15:46:43 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-08-01 15:46:43 (GMT) |
commit | a28968d6982f03ce21eb74f96068e7838d3e9e05 (patch) | |
tree | bb79fbf6418f2d546e21237093645d224525dd6b /googletest | |
parent | d75922ca1c74f50e6a2b018faf435669d4241ca7 (diff) | |
download | googletest-a28968d6982f03ce21eb74f96068e7838d3e9e05.zip googletest-a28968d6982f03ce21eb74f96068e7838d3e9e05.tar.gz googletest-a28968d6982f03ce21eb74f96068e7838d3e9e05.tar.bz2 |
changes to googletest break on failure and googletest filter unittests
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/test/BUILD.bazel | 39 | ||||
-rwxr-xr-x | googletest/test/googletest-break-on-failure-unittest.py (renamed from googletest/test/gtest_break_on_failure_unittest.py) | 8 | ||||
-rw-r--r-- | googletest/test/googletest-break-on-failure-unittest_.cc (renamed from googletest/test/gtest_break_on_failure_unittest_.cc) | 0 | ||||
-rwxr-xr-x | googletest/test/googletest-filter-unittest.py (renamed from googletest/test/gtest_filter_unittest.py) | 12 | ||||
-rw-r--r-- | googletest/test/googletest-filter-unittest_.cc (renamed from googletest/test/gtest_filter_unittest_.cc) | 0 | ||||
-rwxr-xr-x | googletest/test/googletest-throw-on-failure-test.py (renamed from googletest/test/gtest_throw_on_failure_test.py) | 8 | ||||
-rw-r--r-- | googletest/test/googletest-throw-on-failure-test_.cc (renamed from googletest/test/gtest_throw_on_failure_test_.cc) | 2 |
7 files changed, 38 insertions, 31 deletions
diff --git a/googletest/test/BUILD.bazel b/googletest/test/BUILD.bazel index 0c1eb78..090c463 100644 --- a/googletest/test/BUILD.bazel +++ b/googletest/test/BUILD.bazel @@ -227,35 +227,39 @@ py_test( ) cc_binary( - name = "gtest_filter_unittest_", + name = "googletest-filter-unittest_", testonly = 1, - srcs = ["gtest_filter_unittest_.cc"], + srcs = ["googletest-filter-unittest_.cc"], deps = ["//:gtest"], ) py_test( - name = "gtest_filter_unittest", - size = "small", - srcs = ["gtest_filter_unittest.py"], - data = [":gtest_filter_unittest_"], + name = "googletest-filter-unittest", + size = "medium", + srcs = ["googletest-filter-unittest.py"], + data = [":googletest-filter-unittest_"], deps = [":gtest_test_utils"], ) + cc_binary( - name = "gtest_break_on_failure_unittest_", + name = "googletest-break-on-failure-unittest_", testonly = 1, - srcs = ["gtest_break_on_failure_unittest_.cc"], + srcs = ["googletest-break-on-failure-unittest_.cc"], deps = ["//:gtest"], ) + + py_test( - name = "gtest_break_on_failure_unittest", + name = "googletest-break-on-failure-unittest", size = "small", - srcs = ["gtest_break_on_failure_unittest.py"], - data = [":gtest_break_on_failure_unittest_"], + srcs = ["googletest-break-on-failure-unittest.py"], + data = [":googletest-break-on-failure-unittest_"], deps = [":gtest_test_utils"], ) + cc_test( name = "gtest_assert_by_exception_test", size = "small", @@ -263,21 +267,24 @@ cc_test( deps = ["//:gtest"], ) + + cc_binary( - name = "gtest_throw_on_failure_test_", + name = "googletest-throw-on-failure-test_", testonly = 1, - srcs = ["gtest_throw_on_failure_test_.cc"], + srcs = ["googletest-throw-on-failure-test_.cc"], deps = ["//:gtest"], ) py_test( - name = "gtest_throw_on_failure_test", + name = "googletest-throw-on-failure-test", size = "small", - srcs = ["gtest_throw_on_failure_test.py"], - data = [":gtest_throw_on_failure_test_"], + srcs = ["googletest-throw-on-failure-test.py"], + data = [":googletest-throw-on-failure-test_"], deps = [":gtest_test_utils"], ) + cc_binary( name = "gtest_list_tests_unittest_", testonly = 1, diff --git a/googletest/test/gtest_break_on_failure_unittest.py b/googletest/test/googletest-break-on-failure-unittest.py index 16e19db..cd77547 100755 --- a/googletest/test/gtest_break_on_failure_unittest.py +++ b/googletest/test/googletest-break-on-failure-unittest.py @@ -34,7 +34,7 @@ A user can ask Google Test to seg-fault when an assertion fails, using either the GTEST_BREAK_ON_FAILURE environment variable or the --gtest_break_on_failure flag. This script tests such functionality -by invoking gtest_break_on_failure_unittest_ (a program written with +by invoking googletest-break-on-failure-unittest_ (a program written with Google Test) with different environments and command line flags. """ @@ -59,9 +59,9 @@ THROW_ON_FAILURE_ENV_VAR = 'GTEST_THROW_ON_FAILURE' # The environment variable for enabling/disabling the catch-exceptions mode. CATCH_EXCEPTIONS_ENV_VAR = 'GTEST_CATCH_EXCEPTIONS' -# Path to the gtest_break_on_failure_unittest_ program. +# Path to the googletest-break-on-failure-unittest_ program. EXE_PATH = gtest_test_utils.GetTestExecutablePath( - 'gtest_break_on_failure_unittest_') + 'googletest-break-on-failure-unittest_') environ = gtest_test_utils.environ @@ -95,7 +95,7 @@ class GTestBreakOnFailureUnitTest(gtest_test_utils.TestCase): """ def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault): - """Runs gtest_break_on_failure_unittest_ and verifies that it does + """Runs googletest-break-on-failure-unittest_ and verifies that it does (or does not) have a seg-fault. Args: diff --git a/googletest/test/gtest_break_on_failure_unittest_.cc b/googletest/test/googletest-break-on-failure-unittest_.cc index 1231ec2..1231ec2 100644 --- a/googletest/test/gtest_break_on_failure_unittest_.cc +++ b/googletest/test/googletest-break-on-failure-unittest_.cc diff --git a/googletest/test/gtest_filter_unittest.py b/googletest/test/googletest-filter-unittest.py index 92cc77c..1e554d5 100755 --- a/googletest/test/gtest_filter_unittest.py +++ b/googletest/test/googletest-filter-unittest.py @@ -33,7 +33,7 @@ A user can specify which test(s) in a Google Test program to run via either the GTEST_FILTER environment variable or the --gtest_filter flag. This script tests such functionality by invoking -gtest_filter_unittest_ (a program written with Google Test) with different +googletest-filter-unittest_ (a program written with Google Test) with different environments and command line flags. Note that test sharding may also influence which tests are filtered. Therefore, @@ -100,8 +100,8 @@ FILTER_FLAG = 'gtest_filter' # The command line flag for including disabled tests. ALSO_RUN_DISABLED_TESTS_FLAG = 'gtest_also_run_disabled_tests' -# Command to run the gtest_filter_unittest_ program. -COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_filter_unittest_') +# Command to run the googletest-filter-unittest_ program. +COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-filter-unittest_') # Regex for determining whether parameterized tests are enabled in the binary. PARAM_TEST_REGEX = re.compile(r'/ParamTest') @@ -120,7 +120,7 @@ LIST_TESTS_FLAG = '--gtest_list_tests' SUPPORTS_DEATH_TESTS = 'HasDeathTest' in gtest_test_utils.Subprocess( [COMMAND, LIST_TESTS_FLAG]).output -# Full names of all tests in gtest_filter_unittests_. +# Full names of all tests in googletest-filter-unittests_. PARAM_TESTS = [ 'SeqP/ParamTest.TestX/0', 'SeqP/ParamTest.TestX/1', @@ -292,7 +292,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): args=None, check_exit_0=False): """Checks that binary runs correct tests for the given filter and shard. - Runs all shards of gtest_filter_unittest_ with the given filter, and + Runs all shards of googletest-filter-unittest_ with the given filter, and verifies that the right set of tests were run. The union of tests run on each shard should be identical to tests_to_run, without duplicates. If check_exit_0, . @@ -330,7 +330,7 @@ class GTestFilterUnitTest(gtest_test_utils.TestCase): def RunAndVerifyAllowingDisabled(self, gtest_filter, tests_to_run): """Checks that the binary runs correct set of tests for the given filter. - Runs gtest_filter_unittest_ with the given filter, and enables + Runs googletest-filter-unittest_ with the given filter, and enables disabled tests. Verifies that the right set of tests were run. Args: diff --git a/googletest/test/gtest_filter_unittest_.cc b/googletest/test/googletest-filter-unittest_.cc index e74a7a3..e74a7a3 100644 --- a/googletest/test/gtest_filter_unittest_.cc +++ b/googletest/test/googletest-filter-unittest_.cc diff --git a/googletest/test/gtest_throw_on_failure_test.py b/googletest/test/googletest-throw-on-failure-test.py index 5678ffe..7253cfd 100755 --- a/googletest/test/gtest_throw_on_failure_test.py +++ b/googletest/test/googletest-throw-on-failure-test.py @@ -31,7 +31,7 @@ """Tests Google Test's throw-on-failure mode with exceptions disabled. -This script invokes gtest_throw_on_failure_test_ (a program written with +This script invokes googletest-throw-on-failure-test_ (a program written with Google Test) with different environments and command line flags. """ @@ -46,10 +46,10 @@ import gtest_test_utils # The command line flag for enabling/disabling the throw-on-failure mode. THROW_ON_FAILURE = 'gtest_throw_on_failure' -# Path to the gtest_throw_on_failure_test_ program, compiled with +# Path to the googletest-throw-on-failure-test_ program, compiled with # exceptions disabled. EXE_PATH = gtest_test_utils.GetTestExecutablePath( - 'gtest_throw_on_failure_test_') + 'googletest-throw-on-failure-test_') # Utilities. @@ -81,7 +81,7 @@ class ThrowOnFailureTest(gtest_test_utils.TestCase): """Tests the throw-on-failure mode.""" def RunAndVerify(self, env_var_value, flag_value, should_fail): - """Runs gtest_throw_on_failure_test_ and verifies that it does + """Runs googletest-throw-on-failure-test_ and verifies that it does (or does not) exit with a non-zero code. Args: diff --git a/googletest/test/gtest_throw_on_failure_test_.cc b/googletest/test/googletest-throw-on-failure-test_.cc index 2b88fe3..0617c27 100644 --- a/googletest/test/gtest_throw_on_failure_test_.cc +++ b/googletest/test/googletest-throw-on-failure-test_.cc @@ -32,7 +32,7 @@ // Tests Google Test's throw-on-failure mode with exceptions disabled. // // This program must be compiled with exceptions disabled. It will be -// invoked by gtest_throw_on_failure_test.py, and is expected to exit +// invoked by googletest-throw-on-failure-test.py, and is expected to exit // with non-zero in the throw-on-failure mode or 0 otherwise. #include "gtest/gtest.h" |