Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/6141 )
Change subject: scons: Build GTests in the directory they're declared.
......................................................................
scons: Build GTests in the directory they're declared.
This will let us move unit tests into the directory of the code they're
testing.
Change-Id: I611582eb00a06a848f3ce7da89f64e42660cb844
Reviewed-on: https://gem5-review.googlesource.com/6141
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M src/SConscript
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
diff --git a/src/SConscript b/src/SConscript
index 2a495bf..73e9f82 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -275,6 +275,9 @@
'''Create a unit test based on the google test framework.'''
all = []
+ def __init__(self, *args, **kwargs):
+ super(GTest, self).__init__(*args, **kwargs)
+ self.dir = Dir('.')
# Children should have access
Export('Source')
@@ -1031,7 +1034,8 @@
for test in GTest.all:
test_sources = Source.all.with_tag(str(test.target))
test_objs = [ gtest_env.StaticObject(s.tnode) for s in
test_sources ]
- gtest_env.Program('unittest/%s.%s' % (test.target, label),
test_objs)
+ gtest_env.Program(test.dir.File('%s.%s' % (test.target, label)),
+ test_objs)
progname = exename
if strip:
--
To view, visit https://gem5-review.googlesource.com/6141
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I611582eb00a06a848f3ce7da89f64e42660cb844
Gerrit-Change-Number: 6141
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev