util: Add a --no-test-xml option to the m5 util's scons.
This forces the test XML output files to be omitted from the build. This lets you run scons build/ to build everything without running any tests, and can be used to verify that everything builds correctly even if the tests don't run/pass. Change-Id: I280ffe4e76b2249912f9a51a414f4058a3643229 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27755 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabe.black@gmail.com> Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Gabe Black <gabe.black@gmail.com> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
This commit is contained in:
@@ -175,6 +175,7 @@ some other prefix corresponding to that host.
|
||||
### SCons command line flags
|
||||
|
||||
--debug-build: Compile with the -g option, and -O0.
|
||||
--no-test-xml: Exclude the test result XML files from the build.
|
||||
|
||||
## External dependency detection
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ def abspath(d):
|
||||
|
||||
AddOption('--debug-build', dest='debug_build', action='store_true',
|
||||
help='Build with debug info, and disable optimizations.')
|
||||
AddOption('--no-test-xml', dest='no_tests', action='store_true',
|
||||
help='Omit test output xml files from the build.')
|
||||
|
||||
# Universal settings.
|
||||
if GetOption('debug_build'):
|
||||
@@ -85,7 +87,8 @@ def GTest(env, name, *srcs, **kwargs):
|
||||
need_qemu_to_run = 'HAVE_QEMU' in env;
|
||||
|
||||
# If we can run this test...
|
||||
if not need_qemu_to_run or env['HAVE_QEMU']:
|
||||
if (not need_qemu_to_run or env['HAVE_QEMU']) \
|
||||
and not GetOption('no_tests'):
|
||||
# An XML file which holds the results of the test.
|
||||
xml = Dir('test').Dir('result').File('%s.xml' % name)
|
||||
# The basic command line for the test.
|
||||
|
||||
Reference in New Issue
Block a user