scons,systemc: disable systemc tests scons by default
authorCiro Santilli <ciro.santilli@arm.com>
Tue, 21 Jan 2020 18:03:44 +0000 (18:03 +0000)
committerCiro Santilli <ciro.santilli@arm.com>
Tue, 18 Feb 2020 16:34:55 +0000 (16:34 +0000)
Not running the systemc test SConscript reduces the scons startup time
(before any file is compiled) from about 10s to 4s on my machine.

The performance investigation was done at:
https://gem5.atlassian.net/browse/GEM5-256

As before, the systemc tests are still automatically built when
they are run with:

src/systemc/tests/verify.py --update-json build/ARM -j `nproc` \
  --filter-file src/systemc/tests/working.filt

Change-Id: I33b7a53c0a7d70386ab17d7bb4886c84a97a2eb3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25385
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
SConstruct
src/systemc/tests/SConscript
src/systemc/tests/verify.py

index 2ecbaf6785485bb9ee299173eacb07c39482a572..eb6b089848452e0cd00cc5ac067a70a911f76c8a 100755 (executable)
@@ -165,6 +165,8 @@ AddLocalOption('--with-ubsan', dest='with_ubsan', action='store_true',
                help='Build with Undefined Behavior Sanitizer if available')
 AddLocalOption('--with-asan', dest='with_asan', action='store_true',
                help='Build with Address Sanitizer if available')
+AddLocalOption('--with-systemc-tests', dest='with_systemc_tests',
+               action='store_true', help='Build systemc tests')
 
 from gem5_scons import Transform, error, warning
 
index aad7e7fa57be3dfcc04d7a3cfc9312518d2b71bf..e7910590468c6cdfdf63caeb7a442e685134fe5a 100644 (file)
@@ -27,7 +27,7 @@ from __future__ import print_function
 
 Import('*')
 
-if env['USE_SYSTEMC']:
+if env['USE_SYSTEMC'] and GetOption('with_systemc_tests'):
 
     from gem5_scons import Transform
 
index 1b1abfc684a915812e9ed1bfbbf67d1535ca02f3..4d55659d82f36700a105714122a476511ecdb9f8 100755 (executable)
@@ -55,7 +55,7 @@ json_rel_path = os.path.join(tests_rel_path, 'tests.json')
 
 
 def scons(*args):
-    args = ['scons'] + list(args)
+    args = ['scons', '--with-systemc-tests'] + list(args)
     subprocess.check_call(args)