Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/2980 )
Change subject: scons: Merge reading test SConscripts into makeEnv.
......................................................................
scons: Merge reading test SConscripts into makeEnv.
We're already visiting each of the environments, there's no reason to
track them all and then set up test SConscripts on a second pass.
Change-Id: I2d1166f58ac907e874d6ad5de7bd53ff7ad645f8
Reviewed-on: https://gem5-review.googlesource.com/2980
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M src/SConscript
1 file changed, 25 insertions(+), 34 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
diff --git a/src/SConscript b/src/SConscript
index 6cb4976..fd67533 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -1113,7 +1113,11 @@
MakeAction('ln $SOURCE $TARGET', Transform("HARDLINK")))
new_env.M5Binary = targets[0]
- return new_env
+
+ # Set up regression tests.
+ SConscript(os.path.join(env.root.abspath, 'tests', 'SConscript'),
+ variant_dir=variantd('tests', new_env.Label),
+ exports={ 'env' : new_env }, duplicate=False)
# Start out with the compiler flags common to all compilers,
# i.e. they all use -g for opt and -g -pg for prof
@@ -1183,53 +1187,40 @@
# cause any later Source() calls to be fatal, as a diagnostic.
Source.done()
- envList = []
-
# Debug binary
if 'debug' in needed_envs:
- envList.append(
- makeEnv(env, 'debug', '.do',
- CCFLAGS = Split(ccflags['debug']),
- CPPDEFINES = ['DEBUG', 'TRACING_ON=1'],
- LINKFLAGS = Split(ldflags['debug'])))
+ makeEnv(env, 'debug', '.do',
+ CCFLAGS = Split(ccflags['debug']),
+ CPPDEFINES = ['DEBUG', 'TRACING_ON=1'],
+ LINKFLAGS = Split(ldflags['debug']))
# Optimized binary
if 'opt' in needed_envs:
- envList.append(
- makeEnv(env, 'opt', '.o',
- CCFLAGS = Split(ccflags['opt']),
- CPPDEFINES = ['TRACING_ON=1'],
- LINKFLAGS = Split(ldflags['opt'])))
+ makeEnv(env, 'opt', '.o',
+ CCFLAGS = Split(ccflags['opt']),
+ CPPDEFINES = ['TRACING_ON=1'],
+ LINKFLAGS = Split(ldflags['opt']))
# "Fast" binary
if 'fast' in needed_envs:
- envList.append(
- makeEnv(env, 'fast', '.fo', strip = True,
- CCFLAGS = Split(ccflags['fast']),
- CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
- LINKFLAGS = Split(ldflags['fast'])))
+ makeEnv(env, 'fast', '.fo', strip = True,
+ CCFLAGS = Split(ccflags['fast']),
+ CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
+ LINKFLAGS = Split(ldflags['fast']))
# Profiled binary using gprof
if 'prof' in needed_envs:
- envList.append(
- makeEnv(env, 'prof', '.po',
- CCFLAGS = Split(ccflags['prof']),
- CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
- LINKFLAGS = Split(ldflags['prof'])))
+ makeEnv(env, 'prof', '.po',
+ CCFLAGS = Split(ccflags['prof']),
+ CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
+ LINKFLAGS = Split(ldflags['prof']))
# Profiled binary using google-pprof
if 'perf' in needed_envs:
- envList.append(
- makeEnv(env, 'perf', '.gpo',
- CCFLAGS = Split(ccflags['perf']),
- CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
- LINKFLAGS = Split(ldflags['perf'])))
-
- # Set up the regression tests for each build.
- for e in envList:
- SConscript(os.path.join(env.root.abspath, 'tests', 'SConscript'),
- variant_dir = variantd('tests', e.Label),
- exports = { 'env' : e }, duplicate = False)
+ makeEnv(env, 'perf', '.gpo',
+ CCFLAGS = Split(ccflags['perf']),
+ CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'],
+ LINKFLAGS = Split(ldflags['perf']))
# The MakeEnvirons Builder defers the full dependency collection until
# after processing the ISA definition (due to dynamically generated
--
To view, visit https://gem5-review.googlesource.com/2980
To unsubscribe, visit https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2d1166f58ac907e874d6ad5de7bd53ff7ad645f8
Gerrit-Change-Number: 2980
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Curtis Dunham <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev