Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gtest_filter_unittest.GTestFilterUnitTest Class Reference
+ Inheritance diagram for gtest_filter_unittest.GTestFilterUnitTest:
+ Collaboration diagram for gtest_filter_unittest.GTestFilterUnitTest:

Public Member Functions

def AssertSetEqual
 
def AssertPartitionIsValid
 
def AdjustForParameterizedTests
 
def RunAndVerify
 
def RunAndVerifyWithSharding
 
def RunAndVerifyAllowingDisabled
 
def setUp
 
def testDefaultBehavior
 
def testDefaultBehaviorWithShards
 
def testEmptyFilter
 
def testBadFilter
 
def testFullName
 
def testUniversalFilters
 
def testFilterByTestCase
 
def testFilterByTest
 
def testFilterDisabledTests
 
def testWildcardInTestCaseName
 
def testWildcardInTestName
 
def testFilterWithoutDot
 
def testTwoPatterns
 
def testThreePatterns
 
def testNegativeFilters
 
def testFlagOverridesEnvVar
 
def testShardStatusFileIsCreated
 
def testShardStatusFileIsCreatedWithListTests
 
def testShardingWorksWithDeathTests
 

Detailed Description

Tests the env variable or the command line flag to filter tests.

Definition at line 228 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 228 of file gtest_filter_unittest.py

Member Function Documentation

def gtest_filter_unittest.GTestFilterUnitTest.AdjustForParameterizedTests (   self,
  tests_to_run 
)
Adjust tests_to_run in case value parameterized tests are disabled.

Definition at line 251 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 251 of file gtest_filter_unittest.py

References cpp.gmock_class.set.

Referenced by gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyAllowingDisabled(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyWithSharding().

+ Here is the caller graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.AssertPartitionIsValid (   self,
  set_var,
  list_of_sets 
)
Asserts that list_of_sets is a valid partition of set_var.

Definition at line 242 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 242 of file gtest_filter_unittest.py

References cpp.gmock_class.set.

Referenced by gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyWithSharding().

+ Here is the caller graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.AssertSetEqual (   self,
  lhs,
  rhs 
)
Asserts that two sets are equal.

Definition at line 233 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 233 of file gtest_filter_unittest.py

Referenced by gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyAllowingDisabled(), and gtest_filter_unittest.GTestFilterUnitTest.testFlagOverridesEnvVar().

+ Here is the caller graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify (   self,
  gtest_filter,
  tests_to_run 
)
Checks that the binary runs correct set of tests for a given filter.

Definition at line 260 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 260 of file gtest_filter_unittest.py

References gtest_filter_unittest.GTestFilterUnitTest.AdjustForParameterizedTests(), gtest_filter_unittest.GTestFilterUnitTest.AssertSetEqual(), gtest_filter_unittest.RunAndExtractTestList(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyWithSharding(), and gtest_filter_unittest.SetEnvVar().

Referenced by gtest_filter_unittest.GTestFilterUnitTest.testBadFilter(), gtest_throw_on_failure_test.ThrowOnFailureTest.testDefaultBehavior(), gtest_list_tests_unittest.GTestListTestsUnitTest.testDefaultBehavior(), gtest_filter_unittest.GTestFilterUnitTest.testDefaultBehavior(), gtest_filter_unittest.GTestFilterUnitTest.testEmptyFilter(), gtest_filter_unittest.GTestFilterUnitTest.testFilterByTest(), gtest_filter_unittest.GTestFilterUnitTest.testFilterByTestCase(), gtest_filter_unittest.GTestFilterUnitTest.testFilterDisabledTests(), gtest_filter_unittest.GTestFilterUnitTest.testFilterWithoutDot(), gtest_list_tests_unittest.GTestListTestsUnitTest.testFlag(), gtest_filter_unittest.GTestFilterUnitTest.testFullName(), gtest_filter_unittest.GTestFilterUnitTest.testNegativeFilters(), gtest_list_tests_unittest.GTestListTestsUnitTest.testOverrideNonFilterFlags(), gtest_filter_unittest.GTestFilterUnitTest.testThreePatterns(), gtest_throw_on_failure_test.ThrowOnFailureTest.testThrowOnFailureEnvVar(), gtest_throw_on_failure_test.ThrowOnFailureTest.testThrowOnFailureFlag(), gtest_throw_on_failure_test.ThrowOnFailureTest.testThrowOnFailureFlagOverridesEnvVar(), gtest_filter_unittest.GTestFilterUnitTest.testTwoPatterns(), gtest_filter_unittest.GTestFilterUnitTest.testUniversalFilters(), gtest_filter_unittest.GTestFilterUnitTest.testWildcardInTestCaseName(), gtest_filter_unittest.GTestFilterUnitTest.testWildcardInTestName(), and gtest_list_tests_unittest.GTestListTestsUnitTest.testWithFilterFlags().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.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
disabled tests. Verifies that the right set of tests were run.

Args:
  gtest_filter: A filter to apply to the tests.
  tests_to_run: A set of tests expected to run.

Definition at line 328 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 328 of file gtest_filter_unittest.py

References gtest_filter_unittest.GTestFilterUnitTest.AdjustForParameterizedTests(), gtest_filter_unittest.GTestFilterUnitTest.AssertSetEqual(), and gtest_filter_unittest.RunAndExtractTestList().

Referenced by gtest_filter_unittest.GTestFilterUnitTest.testBadFilter(), gtest_filter_unittest.GTestFilterUnitTest.testFilterByTestCase(), gtest_filter_unittest.GTestFilterUnitTest.testFilterDisabledTests(), gtest_filter_unittest.GTestFilterUnitTest.testFullName(), and gtest_filter_unittest.GTestFilterUnitTest.testUniversalFilters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyWithSharding (   self,
  gtest_filter,
  total_shards,
  tests_to_run,
  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
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.

Args:
  gtest_filter: A filter to apply to the tests.
  total_shards: A total number of shards to split test run into.
  tests_to_run: A set of tests expected to run.
  args   :      Arguments to pass to the to the test binary.
  check_exit_0: When set to a true value, make sure that all shards
            return 0.

Definition at line 291 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 291 of file gtest_filter_unittest.py

References gtest_filter_unittest.GTestFilterUnitTest.AdjustForParameterizedTests(), gtest_filter_unittest.GTestFilterUnitTest.AssertPartitionIsValid(), gtest_filter_unittest.RunWithSharding(), and gtest_filter_unittest.SetEnvVar().

Referenced by gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.testDefaultBehaviorWithShards(), gtest_filter_unittest.GTestFilterUnitTest.testEmptyFilter(), gtest_filter_unittest.GTestFilterUnitTest.testFullName(), gtest_filter_unittest.GTestFilterUnitTest.testShardingWorksWithDeathTests(), and gtest_filter_unittest.GTestFilterUnitTest.testUniversalFilters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.setUp (   self)
Sets up test case.

Determines whether value-parameterized tests are enabled in the binary and
sets the flags accordingly.

Definition at line 349 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 349 of file gtest_filter_unittest.py

References gtest_filter_unittest.RunAndReturnOutput().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testBadFilter (   self)
Tests a filter that matches nothing.

Definition at line 382 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 382 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyAllowingDisabled().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testDefaultBehavior (   self)
Tests the behavior of not specifying the filter.

Definition at line 361 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 361 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testDefaultBehaviorWithShards (   self)
Tests the behavior without the filter, with sharding enabled.

Definition at line 366 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 366 of file gtest_filter_unittest.py

References gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyWithSharding().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testEmptyFilter (   self)
Tests an empty filter.

Definition at line 375 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 375 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyWithSharding().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testFilterByTest (   self)
Tests filtering by test name.

Definition at line 414 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 414 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testFilterByTestCase (   self)
Tests filtering by test case name.

Definition at line 404 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 404 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyAllowingDisabled().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testFilterDisabledTests (   self)
Select only the disabled tests to run.

Definition at line 419 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 419 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyAllowingDisabled().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testFilterWithoutDot (   self)
Tests a filter that has no '.' in it.

Definition at line 461 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 461 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testFlagOverridesEnvVar (   self)
Tests that the filter flag overrides the filtering env. variable.

Definition at line 566 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 566 of file gtest_filter_unittest.py

References gtest_filter_unittest.GTestFilterUnitTest.AssertSetEqual(), gtest_filter_unittest.RunAndExtractTestList(), and gtest_filter_unittest.SetEnvVar().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testFullName (   self)
Tests filtering by full name.

Definition at line 388 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 388 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyAllowingDisabled(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyWithSharding().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testNegativeFilters (   self)

Definition at line 514 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 514 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testShardingWorksWithDeathTests (   self)
Tests integration with death tests and sharding.

Definition at line 614 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 614 of file gtest_filter_unittest.py

References gtest_test_utils.Main(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyWithSharding().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testShardStatusFileIsCreated (   self)
Tests that the shard file is created if specified in the environment.

Definition at line 576 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 576 of file gtest_filter_unittest.py

References gtest_test_utils.GetTempDir(), and gtest_filter_unittest.InvokeWithModifiedEnv().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testShardStatusFileIsCreatedWithListTests (   self)
Tests that the shard file is created with the "list_tests" flag.

Definition at line 590 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 590 of file gtest_filter_unittest.py

References gtest_test_utils.GetTempDir(), and gtest_filter_unittest.InvokeWithModifiedEnv().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testThreePatterns (   self)
Tests filters that consist of three patterns.

Definition at line 485 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 485 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testTwoPatterns (   self)
Tests filters that consist of two patterns.

Definition at line 472 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 472 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testUniversalFilters (   self)
Tests filters that match everything.

Definition at line 395 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 395 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyAllowingDisabled(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerifyWithSharding().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testWildcardInTestCaseName (   self)
Tests using wildcard in the test case name.

Definition at line 444 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 444 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify().

+ Here is the call graph for this function:

def gtest_filter_unittest.GTestFilterUnitTest.testWildcardInTestName (   self)
Tests using wildcard in the test name.

Definition at line 456 of file gtest_filter_unittest.py.

View newest version in sPHENIX GitHub at line 456 of file gtest_filter_unittest.py

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_filter_unittest.GTestFilterUnitTest.RunAndVerify().

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: