summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-12-03 01:20:12 -0800
committerGabe Black <gabeblack@google.com>2017-12-07 10:07:53 +0000
commit66a55ce3ffd42663981a54144cfca311502f22b6 (patch)
tree69370428c88267e694fcdc5a9446e202f7cfe5eb /src/cpu
parent08fc1d5ee3e03578b59fa6a6331281e8d123c746 (diff)
downloadgem5-66a55ce3ffd42663981a54144cfca311502f22b6.tar.xz
tests: Accept SourceFilters as sources for GTest.
This change introduces the idea of a SourceFilter which is an object that can filter a SourceList and which can be composed with other SourceFilters using | and & operators. This means a filter can be constructed ahead of time, possibly before all sources have been discovered, and then later applied to any SourceList necessary. This change also modifies GTest so that it accepts SourceFilters in addition to normal source files. These filters will be applied to the final list of all sources, and the result included in the build for that test. By default, gtests will build in all sources tagged with 'gtest lib'. This change also introduces the keyword argument "skip_lib" which will exclude those files. They can then be left out entirely, or they can be re-included as part of a more elaborate filter. That would be useful if someone wanted to write a unit test for, for instance, the warn, etc. macros which rely on the gtest logging support. Those classes could be replaced by something under the control of the unit test, while still including the rest of the gtest library. Change-Id: I13a846dc884b86b9fdcaf809edefd57bb4168b8e Reviewed-on: https://gem5-review.googlesource.com/6262 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/cpu')
0 files changed, 0 insertions, 0 deletions