From: Ciro Santilli Date: Tue, 21 Jan 2020 18:03:44 +0000 (+0000) Subject: scons,systemc: disable systemc tests scons by default X-Git-Tag: v20.0.0.0~476 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d7d9bc240615625141cd6feddbadd392457e49eb;p=gem5.git scons,systemc: disable systemc tests scons by default 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 Maintainer: Gabe Black Tested-by: kokoro --- diff --git a/SConstruct b/SConstruct index 2ecbaf678..eb6b08984 100755 --- a/SConstruct +++ b/SConstruct @@ -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 diff --git a/src/systemc/tests/SConscript b/src/systemc/tests/SConscript index aad7e7fa5..e79105904 100644 --- a/src/systemc/tests/SConscript +++ b/src/systemc/tests/SConscript @@ -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 diff --git a/src/systemc/tests/verify.py b/src/systemc/tests/verify.py index 1b1abfc68..4d55659d8 100755 --- a/src/systemc/tests/verify.py +++ b/src/systemc/tests/verify.py @@ -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)