From 31791727d3ec6aed00557dbb4770637df67c473d Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 1 Jun 2018 23:06:26 -0700 Subject: tests: Make "UnitTest"s more like GTest so they can be in other dirs. The original implementation of UnitTest forced all the output binaries to live in the unittest directory, effectively forcing a flat namespace, and seperating the tests from the things they were supposed to be testing. This changes makes them work more like the newer GTest tests in that they can be based out of whatever directory makes sense, although they're currently all still in unittest for the time being. This change also gets rid of automatically tagging the sources associated with a test with the tests name. The first reason for that was that this also forced a flat namespace, since the tests names didn't have any reference to the test's path. Second, this way of pulling in additional files wasn't necessary any more, now that the UnitTest sources could be source filters like they can be for GTests. Change-Id: I3d96ed766ac5170842dbd6daee39f2873bcd6c75 Reviewed-on: https://gem5-review.googlesource.com/10701 Reviewed-by: Andreas Sandberg Maintainer: Gabe Black --- src/unittest/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/unittest/SConscript') diff --git a/src/unittest/SConscript b/src/unittest/SConscript index 394f1511f..752db1f68 100644 --- a/src/unittest/SConscript +++ b/src/unittest/SConscript @@ -41,7 +41,7 @@ UnitTest('refcnttest', 'refcnttest.cc') UnitTest('strnumtest', 'strnumtest.cc') stattest_py = PySource('m5', 'stattestmain.py', tags='stattest') -UnitTest('stattest', 'stattest.cc', stattest_py, main=True) +UnitTest('stattest', 'stattest.cc', with_tag('stattest'), main=True) UnitTest('symtest', 'symtest.cc') UnitTest('tokentest', 'tokentest.cc') -- cgit v1.2.3