summaryrefslogtreecommitdiff
path: root/src/unittest
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-11-18 20:39:48 -0800
committerGabe Black <gabeblack@google.com>2017-11-27 22:08:50 +0000
commit85168c4e96ed8e3cbad0013102fa021561df49cd (patch)
treeb8ad6c64e8750040beae2c4016228493d3c6a01c /src/unittest
parentf8816180fd920b444d5ae19f22aff8350e23d8e5 (diff)
downloadgem5-85168c4e96ed8e3cbad0013102fa021561df49cd.tar.xz
scons: Switch from "guards" to "tags" on source files.
Tags are just arbitrary strings which are attached to source files which mark them as having some property. By default, all source files have the "gem5 lib" tag added to them which marks them as part of the gem5 library, the primary component of the gem5 binary but also a seperable component for use in, for example, system C. The tags can be completely overridden by setting the "tags" parameter on Source, etc., functions, and can be augmented by setting "add_tags" which are tags that will be added, or alternatively additional tags. It's possible to specify both, in which case the tags will be set to the union of tags and add_tags. add_tags is supposed to be a way to add extra tags to the default without actually overriding the default. Both tags and add_tags can be a list/tuple/etc of tags, or a single string which will be converted into a set internally. Other existing tags include: 1. "python" for files that need or are used with python and are excluded when the --without-python option is set 2. "main" for the file(s) which implement the gem5 binary's main function. 3. The name of a unit test to group its files together. 4. Tags which group source files for partial linking. By grouping the "tags" into a single parameter instead of taking all extra parameters as tags, the extra parameters can, in the future, be passed to the underlying scons environment. Also, the tags are either present or not. With guards, they could be present and True, present and False, or not present at all. Change-Id: I6d0404211a393968df66f7eddfe019897b6573a2 Reviewed-on: https://gem5-review.googlesource.com/5822 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/unittest')
-rw-r--r--src/unittest/SConscript2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unittest/SConscript b/src/unittest/SConscript
index 1f723ed2a..70e3c2f95 100644
--- a/src/unittest/SConscript
+++ b/src/unittest/SConscript
@@ -45,7 +45,7 @@ UnitTest('refcnttest', 'refcnttest.cc')
UnitTest('strnumtest', 'strnumtest.cc')
UnitTest('trietest', 'trietest.cc')
-stattest_py = PySource('m5', 'stattestmain.py', skip_lib=True)
+stattest_py = PySource('m5', 'stattestmain.py', tags='stattest')
UnitTest('stattest', 'stattest.cc', stattest_py, main=True)
UnitTest('symtest', 'symtest.cc')