summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/gtest.h
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2018-01-22 20:20:19 (GMT)
committerGennadiy Civil <misterg@google.com>2018-01-22 20:20:19 (GMT)
commitf1c87ad9f518b86a1efc2a68f452aaf53b899bfe (patch)
tree897bbdf0751bea610e69771c54cd2e74b8510883 /googletest/include/gtest/gtest.h
parent9bc86661f86a5c946f9e0a29ea2e34c8a9897d6b (diff)
downloadgoogletest-f1c87ad9f518b86a1efc2a68f452aaf53b899bfe.zip
googletest-f1c87ad9f518b86a1efc2a68f452aaf53b899bfe.tar.gz
googletest-f1c87ad9f518b86a1efc2a68f452aaf53b899bfe.tar.bz2
merges, cl/155419551 and other
Diffstat (limited to 'googletest/include/gtest/gtest.h')
-rw-r--r--googletest/include/gtest/gtest.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index 4a8f6e0..93b755f 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -687,6 +687,9 @@ class GTEST_API_ TestInfo {
// Returns the line where this test is defined.
int line() const { return location_.line; }
+ // Return true if this test should not be run because it's in another shard.
+ bool is_in_another_shard() const { return is_in_another_shard_; }
+
// Returns true if this test should run, that is if the test is not
// disabled (or it is disabled but the also_run_disabled_tests flag has
// been specified) and its full name matches the user-specified filter.
@@ -707,10 +710,9 @@ class GTEST_API_ TestInfo {
// Returns true iff this test will appear in the XML report.
bool is_reportable() const {
- // The XML report includes tests matching the filter.
- // In the future, we may trim tests that are excluded because of
- // sharding.
- return matches_filter_;
+ // The XML report includes tests matching the filter, excluding those
+ // run in other shards.
+ return matches_filter_ && !is_in_another_shard_;
}
// Returns the result of the test.
@@ -774,6 +776,7 @@ class GTEST_API_ TestInfo {
bool is_disabled_; // True iff this test is disabled
bool matches_filter_; // True if this test matches the
// user-specified filter.
+ bool is_in_another_shard_; // Will be run in another shard.
internal::TestFactoryBase* const factory_; // The factory that creates
// the test object